Skip to content

Commit

Permalink
more release workflow fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rath3t committed Jan 21, 2024
1 parent 968c557 commit 6bb59e7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/createRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ jobs:
cd repo
git push origin main
git push origin v$NEWVERSION
git pull
sleep 20
- uses: "marvinpinto/action-automatic-releases@latest"
with:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ def read_old_version():

def bump_patch_number(version_number: str) -> str:
"""Return a copy of `version_number` with the patch number incremented."""
major, minor, patch = version_number.split(".")
version_number_array = version_number.split(".")

if len(version_number_array)==2:
major, minor = version_number_array
patch =0
elif len(version_number_array)==3:
major, minor, patch = version_number_array
else:
raise Exception("Bad versoin number passed!")
return f"{major}.{minor}.{int(patch) + 1}"


Expand Down

0 comments on commit 6bb59e7

Please sign in to comment.