Skip to content

Commit

Permalink
Insert as first one if it's the first major version
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari committed Oct 14, 2024
1 parent 6534d90 commit 11c4705
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/register_new_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def add_version_to_releases_json(new_version):
new_major, new_minor, _ = new_version.split('.')

# Find the position to insert the new version
insert_index = len(versions)
insert_index = 0
for i, version in enumerate(versions):
major, minor, _ = version.split('.')
if major == new_major and minor == new_minor:
Expand Down Expand Up @@ -80,7 +80,7 @@ def add_version_to_release_pulsar_js(new_version, author, published_at):
}

# Find the position to insert the new version
insert_index = len(releases)
insert_index = 0
for i, release in enumerate(releases):
major, minor, _ = release['tagName'][1:].split('.')
if major == new_major and minor == new_minor:
Expand Down Expand Up @@ -139,7 +139,7 @@ def add_version_to_release_java_js(new_version):
}

# Find the position to insert the new version
insert_index = len(releases)
insert_index = 0
for i, release in enumerate(releases):
major, minor, _ = release['tagName'][1:].split('.')
if major == new_major and minor == new_minor:
Expand Down

0 comments on commit 11c4705

Please sign in to comment.