diff options
author | George Hazan <ghazan@miranda.im> | 2017-08-28 11:49:28 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-08-28 11:49:28 +0300 |
commit | 3cee34ba8faf9722ed21b492791858e1091cb54e (patch) | |
tree | 59e3a6fe66e35af663e4665cdd9c62b369c8d2c0 /tools/build_scripts/build | |
parent | 68be2fc9f39d5945e47e8564aa56c56ff438ac58 (diff) |
fixes for building stable version
Diffstat (limited to 'tools/build_scripts/build')
-rw-r--r-- | tools/build_scripts/build/make_ver_stable.bat | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/build_scripts/build/make_ver_stable.bat b/tools/build_scripts/build/make_ver_stable.bat index 0bc3f576e0..f94f659717 100644 --- a/tools/build_scripts/build/make_ver_stable.bat +++ b/tools/build_scripts/build/make_ver_stable.bat @@ -4,14 +4,20 @@ cd /d %~dp0 for /F "tokens=2,3" %%i in (..\include\m_version.h) do if "%%i"=="MIRANDA_VERSION_FILEVERSION" (set OldVer=%%j) for /F %%i in ('git rev-list --count HEAD') do set Revision=%%i for /F %%i in ('git rev-parse --short HEAD') do set Hash=%%i -REM for /F %%i in ('svnversion m_version.h.in') do set Revision=%%i -REM for /F "tokens=3 delims= " %%l in (build.no) do (set /a "ver3=%%l+1") -for /F "tokens=1,2,3 delims= " %%i in (build.no) do call :WriteVer %%i %%j %%k %Revision% %Hash% + +REM Fix building not-svn repository (e.g., Git mirror) +if "%Revision:~0,11%" == "Unversioned" (set Revision=0) +REM Fix building when svnversion tool is not installed +if "%Revision%" == "" (set Revision=0) +REM Fix trailing 'M', when the working copy contains modifications +if "%Revision:~-1%" == "M" (set Revision=%Revision:~0,-1%) + +for /F "tokens=1,2,3 delims= " %%i in (build.no.stable) do call :WriteVer %%i %%j %%k %Revision% %Hash% goto :eof :WriteVer echo %1.%2.%3.%4.%5 -REM if "%OldVer%" == "%1,%2,%3,%4" (goto :eof) +if "%OldVer%" == "%1,%2,%3,%4" (goto :eof) for /f "delims=/ tokens=1-3" %%a in ("%DATE:~4%") do ( for /f "delims=:. tokens=1-4" %%m in ("%TIME: =0%") do ( |