From dd5043c68c225d1fe456f22a49f5389dce3626ca Mon Sep 17 00:00:00 2001 From: Vitalii Koshura Date: Mon, 22 Aug 2022 20:37:35 +0200 Subject: [PATCH] Fix set-verion.py script to update version.h.in file as well. This fixes #4899 and #4502. Signed-off-by: Vitalii Koshura --- set-version.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/set-version.py b/set-version.py index 14cc75290c..f970d012a1 100644 --- a/set-version.py +++ b/set-version.py @@ -62,6 +62,19 @@ def set_version_h(version): line = '#define BOINC_PRERELEASE 1\n' f.write(line) +def set_version_h_in(version): + _, minor, _ = split_version(version) + with open('version.h.in', 'r') as f: + lines = f.readlines() + with open('version.h.in', 'w') as f: + for line in lines: + if line.find('#define BOINC_PRERELEASE 1') != -1: + if is_release(minor): + line = '//#define BOINC_PRERELEASE 1\n' + else: + line = '#define BOINC_PRERELEASE 1\n' + f.write(line) + def set_version_log(version): with open('version.log', 'w') as f: line = f'{version}\n' @@ -123,6 +136,7 @@ print(f'Setting BOINC version to {version}...') set_configure_ac(version) set_version_h(version) +set_version_h_in(version) set_version_log(version) set_build_gradle(version) set_vcpkg_json(version)