Skip to content

Commit

Permalink
Update issue #299 : Set build number from APPVEYOR_BUILD_NUMBER when …
Browse files Browse the repository at this point in the history
…built on Appveyor using Visual Studio 2013 or 2015
  • Loading branch information
mikecopperwhite committed Feb 20, 2017
1 parent 49101f0 commit 3642b54
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/VersionNo.h
Expand Up @@ -6,16 +6,18 @@
#define VERSION_MAJOR 0
#define VERSION_MINOR 7
#define VERSION_REVISION 1
#define VERSION_BUILD 0 // todo revision from git

#define VERSION_MODIFIER

// If built on appveyor, pass build version information through
//#define APPVEYOR_BUILD_VERSION 98.8.34.1345
#if defined(APPVEYOR_BUILD_VERSION) && defined(APPVEYOR_BUILD_NUMBER)
#define APPVEYOR_BUILD_STRING "Appveyor " STRINGIZE(APPVEYOR_BUILD_VERSION) " : " STRINGIZE(APPVEYOR_BUILD_NUMBER)

#define VERSION_BUILD APPVEYOR_BUILD_NUMBER
#define APPVEYOR_BUILD_STRING "Appveyor build version" STRINGIZE(APPVEYOR_BUILD_VERSION)

#else

#define VERSION_BUILD 0 // todo revision from git
#define APPVEYOR_BUILD_STRING ""

#endif

#define VER_FILE_DESCRIPTION_STR "Built " __DATE__ " " __TIME__ " " APPVEYOR_BUILD_STRING
Expand Down

0 comments on commit 3642b54

Please sign in to comment.