-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(workflow): windows additionnal configuration to resolve bug with …
…msi and versionning
- Loading branch information
1 parent
611fd97
commit 4ee6c9b
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import json | ||
|
||
|
||
def get_package_json(): | ||
with open('app/package.json') as file: | ||
return json.loads(file.read()) | ||
|
||
|
||
def save_package_json(content: dict): | ||
with open('app/package.json', 'w+') as file: | ||
file.write(json.dumps(content)) | ||
|
||
|
||
if __name__ == '__main__': | ||
print("Making changes for Windows MSI build...") | ||
package = get_package_json() | ||
version = package.get('version', '') | ||
valid_version = version.split('-')[0] | ||
print(f"Changing {version} to {valid_version}...") | ||
package['version'] = valid_version | ||
save_package_json(package) | ||
|