From 722c0eb32bcba251d1b155aa05bcf072c7f7a0b6 Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Tue, 29 Sep 2015 11:07:16 +0100 Subject: [PATCH] Promote git revision number to 4th version string component --- product.version | 2 +- tools/buildbot/generate_headers.py | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/product.version b/product.version index 0ef074f2..27f9cd32 100644 --- a/product.version +++ b/product.version @@ -1 +1 @@ -1.8.0-dev +1.8.0 diff --git a/tools/buildbot/generate_headers.py b/tools/buildbot/generate_headers.py index 945d9407..d904ba0a 100644 --- a/tools/buildbot/generate_headers.py +++ b/tools/buildbot/generate_headers.py @@ -55,12 +55,10 @@ def output_version_headers(): if m == None: raise Exception('Could not detremine product version') major, minor, release, tag = m.groups() - product = "{0}.{1}.{2}".format(major, minor, release) + product = "{0}.{1}.{2}.{3}".format(major, minor, release, count) fullstring = product if tag != "": fullstring += "-{0}".format(tag) - if tag == "dev": - fullstring += "+{0}".format(count) with open(os.path.join(OutputFolder, 'sourcemod_version_auto.h'), 'w') as fp: fp.write(""" @@ -74,10 +72,10 @@ def output_version_headers(): #define SM_BUILD_RELEASE \"{4}\" #define SM_BUILD_LOCAL_REV \"{6}\" -#define SM_BUILD_UNIQUEID "{6}:" SM_BUILD_CSET +#define SM_BUILD_UNIQUEID SM_BUILD_LOCAL_REV \":\" SM_BUILD_CSET #define SM_VERSION_STRING \"{5}\" -#define SM_VERSION_FILE {2},{3},{4},0 +#define SM_VERSION_FILE {2},{3},{4},{6} #endif /* _SOURCEMOD_AUTO_VERSION_INFORMATION_H_ */ """.format(tag, shorthash, major, minor, release, fullstring, count))