From d46834265f4ccad6f6d362eca83dc368261b9abb Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Fri, 12 Oct 2018 00:11:20 +1100 Subject: [PATCH] chore: make FILEVERSION 4th component 0 on nightly builds (#15074) Fixes #14900 --- script/bump-version.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/script/bump-version.py b/script/bump-version.py index 4f18b9a2f..769c23735 100755 --- a/script/bump-version.py +++ b/script/bump-version.py @@ -97,7 +97,7 @@ def main(): with scoped_cwd(SOURCE_ROOT): update_version(version, suffix) - update_win_rc(version, versions) + update_win_rc(version, versions, args.bump == "nightly") update_version_h(versions, suffix) update_info_plist(version) update_package_json(version, suffix) @@ -120,7 +120,7 @@ def update_version(version, suffix): f.write(version + suffix) -def update_win_rc(version, versions): +def update_win_rc(version, versions, is_nightly_version): pattern_fv = re.compile(' FILEVERSION [0-9,]+') pattern_pv = re.compile(' PRODUCTVERSION [0-9,]+') pattern_fvs = re.compile(' *VALUE "FileVersion", "[0-9.]+"') @@ -134,7 +134,10 @@ def update_win_rc(version, versions): for i in range(0, len(lines)): line = lines[i] if pattern_fv.match(line): - lines[i] = ' FILEVERSION {0}\r\n'.format(','.join(versions)) + versions_64_bit = versions[::] + if is_nightly_version: + versions_64_bit[3] = '0' + lines[i] = ' FILEVERSION {0}\r\n'.format(','.join(versions_64_bit)) elif pattern_pv.match(line): lines[i] = ' PRODUCTVERSION {0}\r\n'.format(','.join(versions)) elif pattern_fvs.match(line):