From d1c1af7b48d3cf6ff0878c9fbea2556edbe1030b Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Tue, 26 Sep 2023 09:09:54 -0400 Subject: [PATCH] Fix package version handling for initial release --- packages/build_scripts/new_version.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/build_scripts/new_version.py b/packages/build_scripts/new_version.py index 858079e5bbc8..187dbbd674ae 100644 --- a/packages/build_scripts/new_version.py +++ b/packages/build_scripts/new_version.py @@ -19,7 +19,10 @@ def main(argv): if not DEV_RELEASE: # Discard epoch, release numbers after micro, pre-, post-, dev-release segments and local version new_version_tuple = list(version_obj.release[:3]) - new_version_tuple[2] += 1 + if len(new_version_tuple) < 3: + new_version_tuple.append(0) + else: + new_version_tuple[2] += 1 new_version = ".".join(map(str, new_version_tuple)) else: dev_number = version_obj.dev