From: Iain Patterson Date: Thu, 26 Dec 2013 19:30:47 +0000 (+0000) Subject: Generate version information as part of the build. X-Git-Tag: v2.22~112 X-Git-Url: http://git.iain.cx/?p=nssm.git;a=commitdiff_plain;h=44e85d48df1ecc95547d066459a1e904f128618c Generate version information as part of the build. Use git (if it's available) to create a major and minor version number based on the most recent tag name. If we are not building from a tagged commit, use the commit count since the last tag as the subminor version. If Jenkins is being used for the build, use the build number as the subsubminor version. --- diff --git a/nssm.h b/nssm.h index 46308d5..636524d 100644 --- a/nssm.h +++ b/nssm.h @@ -21,9 +21,7 @@ void strip_basename(TCHAR *); int usage(int); #define NSSM _T("nssm") -#define NSSM_VERSION _T("2.21") -#define NSSM_VERSIONINFO 2,21,0,0 -#define NSSM_DATE _T("2013-11-24") +#include "version.h" /* Throttle the restart of the service if it stops before this many diff --git a/nssm.vcproj b/nssm.vcproj index 803bb43..3b52894 100755 --- a/nssm.vcproj +++ b/nssm.vcproj @@ -30,6 +30,8 @@ > version.h #define NSSM_VERSION _T("%description%") +@echo>>version.h #define NSSM_VERSIONINFO %major%,%minor%,%n%,%BUILD_NUMBER% +@echo>>version.h #define NSSM_DATE _T("%DATE%")