summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorwatcherhd <watcherhd@gmail.com>2017-08-25 10:23:15 +0300
committerwatcherhd <watcherhd@gmail.com>2017-08-25 10:23:15 +0300
commit9ae643b18d39b5f88348a9b07eb954c996624afc (patch)
tree40373399a1740dd2020a1b48f8f39b7a12b47e7f /tools
parentd1a3ce14b1be77e3ea41ce729c894287668b730c (diff)
stable mirver generation updated
Diffstat (limited to 'tools')
-rw-r--r--tools/build_scripts/build/make_ver_stable.bat14
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/build_scripts/build/make_ver_stable.bat b/tools/build_scripts/build/make_ver_stable.bat
index cedff11a3b..0bc3f576e0 100644
--- a/tools/build_scripts/build/make_ver_stable.bat
+++ b/tools/build_scripts/build/make_ver_stable.bat
@@ -2,14 +2,16 @@
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 ('svnversion m_version.h.in') do set Revision=%%i
-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% %ver3%
+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%
goto :eof
:WriteVer
echo %1.%2.%3.%4.%5
-if "%OldVer%" == "%1,%2,%3,%4,%5" (goto :eof)
+REM 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 (
@@ -21,10 +23,10 @@ copy m_version.h.in "%TempFileName%"
echo #define MIRANDA_VERSION_FILEVERSION %1,%2,%3,%4 >> "%TempFileName%"
echo #define MIRANDA_VERSION_STRING "%1.%2.%3.%4" >> "%TempFileName%"
-echo #define MIRANDA_VERSION_DISPLAY "%1.%2.%3 build #%4" >> "%TempFileName%"
+echo #define MIRANDA_VERSION_DISPLAY "%1.%2.%3 build #%4 (%5)" >> "%TempFileName%"
echo #define MIRANDA_VERSION_DWORD MIRANDA_MAKE_VERSION(%1, %2, %3, %4) >> "%TempFileName%"
echo #define MIRANDA_VERSION_CORE MIRANDA_MAKE_VERSION(%1, %2, %3, 0) >> "%TempFileName%"
-echo #define MIRANDA_VERSION_CORE_STRING "%1.%2.%5" >> "%TempFileName%"
+echo #define MIRANDA_VERSION_CORE_STRING "%1.%2.%3" >> "%TempFileName%"
echo. >> "%TempFileName%"
echo #endif // M_VERSION_H__ >> "%TempFileName%"