Skip to content

[ci] update set-client-version.py to target correct json file of the Windows installer configuration#6434

Merged
AenBleidd merged 1 commit intomasterfrom
vko_fix_update_client_release_script
Jul 15, 2025
Merged

[ci] update set-client-version.py to target correct json file of the Windows installer configuration#6434
AenBleidd merged 1 commit intomasterfrom
vko_fix_update_client_release_script

Conversation

@AenBleidd
Copy link
Copy Markdown
Member

No description provided.

…Windows installer configuration

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
@AenBleidd AenBleidd added this to the Client/Manager 8.2.5 milestone Jul 15, 2025
Copilot AI review requested due to automatic review settings July 15, 2025 02:17
@github-project-automation github-project-automation bot moved this to In progress in Client/Manager Jul 15, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Windows installer version script to target the correct JSON configuration file and renames its handler for clarity.

  • Renames set_boinc_json to set_property_json
  • Changes file path from installer/boinc.json to installer/include/Property.json
  • Updates call site to use the new function name
Comments suppressed due to low confidence (1)

release_tools/set-client-version.py:92

  • [nitpick] The function name set_property_json is quite generic; consider renaming it to something more descriptive like set_installer_product_version to clarify its purpose.
def set_property_json(version):

Comment on lines +93 to +99
with open('installer/include/Property.json','r') as f:
data = json.load(f)
for item in data['Property']:
if item['Property'] == 'ProductVersion':
item['Value'] = version
break
with open('installer/boinc.json','w') as f:
with open('installer/include/Property.json','w') as f:
Copy link

Copilot AI Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JSON file path is hard-coded in two places; extracting it as a top-level constant (e.g. PROPERTY_JSON_PATH) would reduce duplication and make future updates easier.

Copilot uses AI. Check for mistakes.
Comment on lines 95 to 97
for item in data['Property']:
if item['Property'] == 'ProductVersion':
item['Value'] = version
Copy link

Copilot AI Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The literal JSON keys ('Property', 'Value', 'ProductVersion') are magic strings; consider defining them as constants to avoid typos and ease maintenance.

Suggested change
for item in data['Property']:
if item['Property'] == 'ProductVersion':
item['Value'] = version
for item in data[PROPERTY_KEY]:
if item[PROPERTY_KEY] == PRODUCT_VERSION_KEY:
item[VALUE_KEY] = version

Copilot uses AI. Check for mistakes.
@AenBleidd AenBleidd merged commit 02ee54a into master Jul 15, 2025
177 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Merged in Client/Manager Jul 15, 2025
@AenBleidd AenBleidd deleted the vko_fix_update_client_release_script branch July 15, 2025 02:38
AenBleidd added a commit that referenced this pull request Jul 15, 2025
[ci] update set-client-version.py to target correct json file of the Windows installer configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants