Skip to content

Commit

Permalink
Fix version tagging for newer major version
Browse files Browse the repository at this point in the history
  • Loading branch information
nimrod-teich committed Mar 19, 2024
1 parent 33c4a78 commit 49ecf5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def get_release_and_pre_release_tags() -> Tuple[List[str], List[str]]:
# only build tags after 0.24
tags = []
for tag in raw_tags:
major = tag.replace("v", "").split(".")[0]
minor = tag.replace("v", "").split(".")[1]
minor_int = int(minor)

if minor_int >= 24:
if int(minor) >= 24 or int(major) > 0:
tags.append(tag)

releases = []
Expand Down
6 changes: 4 additions & 2 deletions .github/tag_latest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@

def split_tag(tag):
# split with 0 as default value
tag.replace('prerelease-v', 'v')
tag_split = tag.split('.') + ["0", "0", "0"]
tag = tag.replace('prerelease-v', 'v')
tag_split = tag.split('.')
tag_split = tag_split + [tag_split[0], "0", "0"]

def safe_str_to_int(s, default=0):
try:
Expand All @@ -19,6 +20,7 @@ def safe_str_to_int(s, default=0):
return default

tag_split = [safe_str_to_int(x) for x in tag_split]

return (tag_split[0], tag_split[1], tag_split[2], tag_split[3])


Expand Down

0 comments on commit 49ecf5c

Please sign in to comment.