summaryrefslogtreecommitdiff
path: root/win32/genversion.bat
blob: 9bc6917f29606f4b183edec3459c030297ac09e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
@echo off

for /f %%v in ('git describe --tags --match "v*"') do set version=%%v

set version_out=#define %2 "%version%"

echo %version_out% > %1_temp

echo n | comp %1_temp %1 > NUL 2> NUL

if not errorlevel 1 goto exit

copy /y %1_temp %1

:exit

del %1_temp