mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-07-17 21:56:07 -04:00
changed release workflow from releasing snapshot versions to "stable" versions. More info at https://github.com/MCV-Software/TWBlue/pull/567
This commit is contained in:
@@ -10,9 +10,10 @@ commit_info = requests.get("https://gitlab.com/api/v4/projects/23482196/reposito
|
||||
commit_info = commit_info.json()
|
||||
commit = commit_info["short_id"]
|
||||
print("Got new version info: {commit}".format(commit=commit,))
|
||||
new_version = commit_info["created_at"][:10].replace("-", ".")
|
||||
file = open("application.py", "r", encoding="utf-8")
|
||||
lines = file.readlines()
|
||||
lines[-1] = 'version = "{}"'.format(commit_info["created_at"][:10].replace("-", "."))
|
||||
lines[-1] = 'version = "{}"'.format(new_version)
|
||||
file.close()
|
||||
file2 = open("application.py", "w", encoding="utf-8")
|
||||
file2.writelines(lines)
|
||||
@@ -22,9 +23,15 @@ print("Wrote application.py with the new version info.")
|
||||
print("Updating next version on installer setup...")
|
||||
file = open("..\\scripts\\twblue.nsi", "r", encoding="utf-8")
|
||||
contents = file.read()
|
||||
contents = contents.replace("0.95", commit_info["created_at"][:10].replace("-", "."))
|
||||
contents = contents.replace("0.95", new_version)
|
||||
file.close()
|
||||
file2 = open("..\\scripts\\twblue.nsi", "w", encoding="utf-8")
|
||||
file2.write(contents)
|
||||
file2.close()
|
||||
print("done")
|
||||
|
||||
print("Writing new version to version.txt")
|
||||
version_txt = open("../version.txt", "w", encoding="utf8")
|
||||
version_txt.write(new_version)
|
||||
version_txt.close()
|
||||
print("Done.")
|
||||
|
Reference in New Issue
Block a user