summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/build_scripts/git_update.bat7
-rw-r--r--tools/build_scripts/zz_zRebuildUploadStable.bat4
-rw-r--r--tools/build_scripts/zz_zRebuildUploadTrunk.bat2
3 files changed, 11 insertions, 2 deletions
diff --git a/tools/build_scripts/git_update.bat b/tools/build_scripts/git_update.bat
index 5d121ead94..e0292027fd 100644
--- a/tools/build_scripts/git_update.bat
+++ b/tools/build_scripts/git_update.bat
@@ -1,3 +1,10 @@
+if "%1" == "" (
+ echo Branch should be specified in the first parameter
+ exit 1
+)
+
+git checkout %1
+
git reset --hard
git pull --rebase=true --progress -v 2>&1 > update.log
diff --git a/tools/build_scripts/zz_zRebuildUploadStable.bat b/tools/build_scripts/zz_zRebuildUploadStable.bat
index 200216cd7f..114f9be581 100644
--- a/tools/build_scripts/zz_zRebuildUploadStable.bat
+++ b/tools/build_scripts/zz_zRebuildUploadStable.bat
@@ -2,7 +2,9 @@
echo WARNING!!! You are about to compile and upload STABLE versions of Miranda NG! Are you absolutely sure?!
pause
-call git_update.bat
+for /F "tokens=1,2,3 delims= " %%i in (build/build.no.stable) do set Branch=%%i_%%j_%%k
+
+call git_update.bat %Branch%
set GIT_STATUS=%ERRORLEVEL%
if %GIT_STATUS%==0 echo Git update success
if not %GIT_STATUS%==0 goto :Error
diff --git a/tools/build_scripts/zz_zRebuildUploadTrunk.bat b/tools/build_scripts/zz_zRebuildUploadTrunk.bat
index 70898b5463..0e9012346f 100644
--- a/tools/build_scripts/zz_zRebuildUploadTrunk.bat
+++ b/tools/build_scripts/zz_zRebuildUploadTrunk.bat
@@ -1,4 +1,4 @@
-call git_update.bat
+call git_update.bat master
set GIT_STATUS=%ERRORLEVEL%
if %GIT_STATUS%==0 echo Git update success
if not %GIT_STATUS%==0 goto :Error