project64/Source/Script/UpdateVersion.cmd

23 lines
562 B
Batchfile
Raw Normal View History

2015-09-13 07:30:59 +00:00
@echo off
SETLOCAL
set origdir=%cd%
cd /d %~dp0..\..
set base_dir=%cd%
cd /d %origdir%
2017-11-15 09:04:09 +00:00
if "%~3"=="" (
echo Usage: UpdateVersion.cmd [BuildMode] [InFile] [OutFile]
goto :eof
2015-09-13 07:30:59 +00:00
)
2017-11-15 09:04:09 +00:00
if not "%1" == "" set BuildMode=%~1
if not "%~2" == "" set InFile="%~2"
if not "%~3" == "" set OutFile="%~3"
2015-09-13 07:30:59 +00:00
2017-11-15 09:04:09 +00:00
FOR /F "tokens=1 delims=" %%A in ('git describe --tags --long --dirty') do SET current_tag=%%A
2015-09-13 07:30:59 +00:00
echo "%base_dir%\Bin\%BuildMode%\UpdateVersion.exe" %InFile% %OutFile% "%current_tag%"
2017-11-15 09:04:09 +00:00
"%base_dir%\Bin\%BuildMode%\UpdateVersion.exe" %InFile% %OutFile% "%current_tag%"
2015-09-13 07:30:59 +00:00