Skip to content

Commit

Permalink
Commit all environment repos script
Browse files Browse the repository at this point in the history
  • Loading branch information
sytelus committed Nov 8, 2018
1 parent 7413a25 commit 472a7cd
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions tools/gitcommitall.bat
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
REM @echo off
@echo off
REM //---------- set up variable ----------
setlocal
set ROOT_DIR=%~dp0

REM root folder for repos
set RepoRoot=%1
set CommitMessage=%2

IF "%CommitMessage%"=="" (
echo "CommitMessage needs to be provided"
goto :failed
)

IF NOT EXIST %RepoRoot% (
echo "Specify root directory for repo as argument!"
echo "RepoRoot needs to be provided"
goto :failed
)

Expand All @@ -33,12 +39,11 @@ TrapCamera
Warehouse
ZhangJiaJie
) do (
echo Now doing "%%x"
cd %RepoRoot%
cd
@echo Now doing "%%x"
cd /d %RepoRoot%
cd "%%x"
git add -A
git commit -m "By gitcomitall.bat"
git commit -m %CommitMessage%
git push
cd ..
)
Expand All @@ -47,8 +52,8 @@ cd ..
goto :done

:failed
echo "Error occured while packaging"
echo "Usage: package.bat <path\to\output> <path to Engine\Build\BatchFiles> <UE Version>"
@echo "Error occured"
@echo Usage: gitcommitall <repo root> <commit message>
cd "%ROOT_DIR%"
exit /b 1

Expand Down

0 comments on commit 472a7cd

Please sign in to comment.