From 1c5eb0dd1346ad9eb7963e9e5d1145108ccbd9f0 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Thu, 26 Sep 2024 16:51:56 +0300 Subject: [PATCH] Fix error with a dot in the version --- python/scripts/generate_package_version.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/scripts/generate_package_version.py b/python/scripts/generate_package_version.py index 7f85307..3054ab9 100755 --- a/python/scripts/generate_package_version.py +++ b/python/scripts/generate_package_version.py @@ -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 @@ -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]))