From dc61323b2ce5478b1fc07581e64f7b7fcfdaf239 Mon Sep 17 00:00:00 2001 From: Joost Heitbrink Date: Sat, 30 Nov 2019 17:22:22 +0100 Subject: PCK: Set VERSION_PATCH in header, factor out header magic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unify pack file version and magic to avoid hardcoded literals. `version.py` now always includes `patch` even for the first release in a new stable branch (e.g. 3.2). The public name stays without the patch number, but `Engine.get_version_info()` already included `patch == 0`, and we can remove some extra handling of undefined `VERSION_PATCH` this way. Co-authored-by: RĂ©mi Verschelde --- methods.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'methods.py') diff --git a/methods.py b/methods.py index 23d66f7f1e..33b8f1cbe7 100644 --- a/methods.py +++ b/methods.py @@ -67,8 +67,7 @@ def update_version(module_version_string=""): f.write("#define VERSION_NAME \"" + str(version.name) + "\"\n") f.write("#define VERSION_MAJOR " + str(version.major) + "\n") 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_PATCH " + str(version.patch) + "\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") -- cgit v1.2.3