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]))