-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added a script to update version in the buildVars.py automatically if…
… it as not been changed but is confirmed in a commit. this can be used manually, or automatically with a post commit hook.
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ addon/doc/en/ | |
*.py[co] | ||
*.nvda-addon | ||
.sconsign.dblite | ||
*.zip | ||
*.code-workspace | ||
*.json |
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,13 @@ | ||
import re, sys | ||
|
||
if len(sys.argv) < 2: | ||
print("the version was not detected") | ||
exit(1) | ||
version = sys.argv[1] | ||
print(f"the version recognized is: {version}") | ||
with open("buildVars.py", 'r+', encoding='utf-8') as f: | ||
text = f.read() | ||
text = re.sub('"addon_version" *:.*,', f'"addon_version" : "{version}",', text) | ||
f.seek(0) | ||
f.write(text) | ||
f.truncate() |