summaryrefslogtreecommitdiff
path: root/methods.py
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-11-19 21:26:05 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-11-20 00:51:14 +0100
commit3fd23da5ee2e69e1aca663b52ecf1f3d61188a64 (patch)
treea2b37af18c785fc6076e1e0a9f44ac85c91176ca /methods.py
parent6947bed015c33706b9a441fd47cd84f0da99097c (diff)
Rename the version's "revision" to "build"
That "revision" was inherited from SVN days but had been since then used to give information about the build: "custom_build", "official", "<some distro's build>". It can now be overridden with the BUILD_NAME environment variable.
Diffstat (limited to 'methods.py')
-rw-r--r--methods.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/methods.py b/methods.py
index 511faf7ec1..2be73f02d2 100644
--- a/methods.py
+++ b/methods.py
@@ -1154,11 +1154,11 @@ def add_module_version_string(self,s):
def update_version(module_version_string=""):
- rev = "custom_build"
+ build_name = "custom_build"
+ if (os.getenv("BUILD_NAME") != None):
+ build_name = os.getenv("BUILD_NAME")
+ print("Using custom build name: " + build_name)
- if (os.getenv("BUILD_REVISION") != None):
- rev = os.getenv("BUILD_REVISION")
- print("Using custom revision: " + rev)
import version
f = open("core/version_generated.gen.h", "w")
@@ -1168,8 +1168,8 @@ def update_version(module_version_string=""):
f.write("#define VERSION_MINOR " + str(version.minor) + "\n")
if (hasattr(version, 'patch')):
f.write("#define VERSION_PATCH " + str(version.patch) + "\n")
- f.write("#define VERSION_REVISION \"" + str(rev) + "\"\n")
f.write("#define VERSION_STATUS \"" + str(version.status) + "\"\n")
+ f.write("#define VERSION_BUILD \"" + str(build_name) + "\"\n")
f.write("#define VERSION_MODULE_CONFIG \"" + str(version.module_config) + module_version_string + "\"\n")
import datetime
f.write("#define VERSION_YEAR " + str(datetime.datetime.now().year) + "\n")