Skip to content

Commit

Permalink
Fix error with a dot in the version
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaStebaev committed Sep 26, 2024
1 parent 5b87eab commit 1c5eb0d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/scripts/generate_package_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ def calculate_version(release_version):
return release_version
parts = release_version.strip().split('-')
[main_part, tail_part] = [parts[0], '-'.join(parts[1:])]
[branch, build_number] = tail_part.split('.')
tail_parts = tail_part.split('.')
[branch, build_number] = ['.'.join(tail_parts[:-1]), tail_part[-1]]
if branch == 'stable':
if int(build_number) == 0:
return main_part
Expand All @@ -28,7 +29,7 @@ def main():
if version_key not in os.environ or not os.environ[version_key]:
print('VERSION environment variable is not set', file=sys.stderr)
exit(1)

print(calculate_version(os.environ[version_key]))


Expand Down

0 comments on commit 1c5eb0d

Please sign in to comment.