Skip to content

Commit

Permalink
fix semver generation
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitalita committed Oct 31, 2024
1 parent 9cb2c33 commit be80bd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 1 addition & 3 deletions SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,10 @@ def write_version_header():
prerelease_tag = f"{prerelease_name}.{prerelease_num}"
else:
prerelease_tag += ".1"
new_version_info = f"{major}.{minor}.{patch}-{prerelease_tag}+{dev_stuff}"
new_version_info = f"{major}.{minor}.{patch}-{prerelease_tag}+{dev_stuff.replace('+', '-')}"
else:
patch = str(int(patch) + 1) if patch.isdigit() else 0
new_version_info = f"{major}.{minor}.{patch}-{dev_stuff}"
if build_metadata:
new_version_info += "+" + build_metadata
version_info = new_version_info
else:
version_info = res
Expand Down
3 changes: 3 additions & 0 deletions standalone/gdre_main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ func is_new_version(new_version: String):
var curr_semver = SemVer.parse_semver(curr_version)
var new_semver = SemVer.parse_semver(new_version)
if curr_semver == null or new_semver == null:
print("Error: invalid semver format")
print("Current version: " + curr_version)
print("New version: " + new_version)
return false
if new_semver.gt(curr_semver):
return true
Expand Down

0 comments on commit be80bd1

Please sign in to comment.