Add serial number support
[mfgtools.git] / msvc / createversion.bat
blobb5cd5d91f91d340f2d434a2cef905c8d1f8a6d90
1 @echo off
3 call git --version
4 IF ERRORLEVEL 1 (
5         echo build from tarball
6 ) ELSE (
7         IF "%APPVEYOR_BUILD_VERSION%" == "" (
8                 echo build not from appveryor
9         ) ELSE (
10                 git tag -m "uuu %APPVEYOR_BUILD_VERSION%" uuu_%APPVEYOR_BUILD_VERSION%
11         ) 
13         FOR /F "tokens=*" %%a in ('call git describe --long') do (
14                 echo #define GIT_VERSION "lib%%a" > %1/gitversion.h
15         )