mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Fix oopsie from me using version.py on an existing version
This commit is contained in:
@@ -56,9 +56,6 @@ END TEMPLATE-->
|
||||
|
||||
## 230.0.0
|
||||
|
||||
|
||||
## 223.0.0
|
||||
|
||||
### New features
|
||||
|
||||
* Added `InterpolatedStringHandlerArgumentAttribute` to the sandbox whitelist.
|
||||
|
||||
@@ -45,6 +45,10 @@ def write_version(version: str, file_only: bool):
|
||||
# Verify
|
||||
verify_version(version)
|
||||
|
||||
if tag_exists(version):
|
||||
print(f"Version tag already exists: v{version}")
|
||||
sys.exit(1)
|
||||
|
||||
update_release_notes(version)
|
||||
|
||||
# Update
|
||||
@@ -111,4 +115,8 @@ def undo_version(version: str):
|
||||
subprocess.run(["git", "reset", "--keep", "HEAD^"], check=True)
|
||||
print("Done (deleted commit saved as " + savename + ")")
|
||||
|
||||
def tag_exists(version: str):
|
||||
result = subprocess.run(["git", "tag", "-l", "v" + version], stdout=subprocess.PIPE, encoding="utf-8")
|
||||
return bool(result.stdout.strip())
|
||||
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user