-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to install two versions of AMAI into a map
- Loading branch information
1 parent
301f2a3
commit bd69c8f
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
@ECHO OFF | ||
SET VER=%~1 | ||
SET TAG=%~2 | ||
SET MAP=%~3 | ||
@rem git.exe instead of just git, because some git.cmd commands cause the entire batch script to exit. | ||
where git.exe | ||
if "%errorlevel%"=="1" ( | ||
ECHO Tagging %VER% error | ||
ECHO Please install Git as a requirement. Download : https://gitforwindows.org/ | ||
exit /b 1 | ||
) | ||
if "%errorlevel%"=="1" ( | ||
ECHO Reference %TAG% not found | ||
exit /b 1 | ||
) | ||
if not exist Scripts\%VER%\a\NUL mkdir Scripts\%VER%\a | ||
if not exist Scripts\%VER%\b\NUL mkdir Scripts\%VER%\b | ||
for /f %%a in ('git.exe rev-parse --abbrev-ref HEAD') do set "HEAD_REFNAME=%%a" | ||
for /f %%a in ('git.exe rev-parse HEAD') do set "COMMIT_HASH_A=%%a" | ||
call MakeVERBase.bat %VER% 1 | ||
del Scripts\%VER%\a\* /Q | ||
copy Scripts\%VER%\*.ai Scripts\%VER%\a | ||
echo %HEAD_REFNAME%:%COMMIT_HASH_A% > Scripts\%VER%\a\amai_version.txt | ||
echo Tagged HEAD %HEAD_REFNAME% (%COMMIT_HASH_A%) as Version A | ||
|
||
git.exe checkout %TAG% | ||
for /f %%a in ('git.exe rev-parse HEAD') do set "COMMIT_HASH_B=%%a" | ||
call MakeVERBase.bat %VER% 1 | ||
del Scripts\%VER%\b\* /Q | ||
copy Scripts\%VER%\*.ai Scripts\%VER%\b | ||
ren Scripts\%VER%\b\elf.ai elf2.ai | ||
ren Scripts\%VER%\b\human.ai human2.ai | ||
ren Scripts\%VER%\b\orc.ai orc2.ai | ||
ren Scripts\%VER%\b\undead.ai undead2.ai | ||
echo %TAG%:%COMMIT_HASH_B% > Scripts\%VER%\b\amai_version2.txt | ||
echo Tagged %TAG% (%COMMIT_HASH_B%) as Version B | ||
|
||
git.exe checkout %HEAD_REFNAME% | ||
call InstallVERToMap "%VER%" "%MAP%" 3 |