git://git.iain.cx/iain
/
nssm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More detailed file properties.
[nssm.git]
/
version.cmd
diff --git
a/version.cmd
b/version.cmd
index
536c3e6
..
77045c9
100644
(file)
--- a/
version.cmd
+++ b/
version.cmd
@@
-21,13
+21,27
@@
set version=%version:~0,-1%
set minor=%version:*.=%
\r
call set major=%%version:.%minor%=%%
\r
\r
set minor=%version:*.=%
\r
call set major=%%version:.%minor%=%%
\r
\r
+@rem Build flags.
\r
+set flags=0L
\r
+
\r
@rem Don't include n and commit if we match a tag exactly.
\r
@rem Don't include n and commit if we match a tag exactly.
\r
-if "%n%" == "0" set description=%major%.%minor%
\r
+if "%n%" == "0" (set description=%major%.%minor%) else set flags=VS_FF_PRERELEASE
\r
+@rem Maybe we couldn't get the git tag.
\r
+if "%commit%" == "prerelease" set flags=VS_FF_PRERELEASE
\r
\r
@rem Ignore the build number if this isn't Jenkins.
\r
if "%BUILD_NUMBER%" == "" set BUILD_NUMBER=0
\r
\r
\r
@rem Ignore the build number if this isn't Jenkins.
\r
if "%BUILD_NUMBER%" == "" set BUILD_NUMBER=0
\r
\r
+@rem Copyright year provided by Jenkins.
\r
+if "%BUILD_ID%" == "" (set year=) else (
\r
+ set md=%BUILD_ID:*-=%
\r
+ call set year=%%BUILD_ID:%md%=%%
\r
+ set year=%year:~0,-1%
\r
+)
\r
+
\r
@rem Create version.h.
\r
@echo>version.h #define NSSM_VERSION _T("%description%")
\r
@echo>>version.h #define NSSM_VERSIONINFO %major%,%minor%,%n%,%BUILD_NUMBER%
\r
@echo>>version.h #define NSSM_DATE _T("%DATE%")
\r
@rem Create version.h.
\r
@echo>version.h #define NSSM_VERSION _T("%description%")
\r
@echo>>version.h #define NSSM_VERSIONINFO %major%,%minor%,%n%,%BUILD_NUMBER%
\r
@echo>>version.h #define NSSM_DATE _T("%DATE%")
\r
+@echo>>version.h #define NSSM_FILEFLAGS %flags%
\r
+@echo>>version.h #define NSSM_COPYRIGHT _T("(c) 2003-%year% Iain Patterson")
\r