Fix a bug in the manual tag

This commit is contained in:
Stanislas Daniel Claude Dolcini 2024-09-09 21:47:27 +03:00
parent e082ff5c3b
commit 64d2fffec2
Signed by untrusted user: Stan
GPG Key ID: 244943DFF8370D60

View File

@ -42,8 +42,7 @@ def get_previous_tag_in_series(tag):
manual_tag = '.'.join(version_array) manual_tag = '.'.join(version_array)
if manual_tag in filtered_tags: if manual_tag in filtered_tags:
current_index = filtered_tags.index(manual_tag) current_index = filtered_tags.index(manual_tag)
if current_index + 1 < len(filtered_tags): return filtered_tags[current_index]
return filtered_tags[current_index + 1]
return None return None
except Exception as e: except Exception as e:
@ -52,7 +51,7 @@ def get_previous_tag_in_series(tag):
def get_changelog(current_commit, previous_tag): def get_changelog(current_commit, previous_tag):
""" Get the changelog between the current commit and the previous tag. """ """ Get the changelog between the current commit and the previous tag. """
try: try:
if previous_tag: if previous_tag is not None:
changelog = run_git_command(['git', 'log', f'{previous_tag}..{current_commit}', '--oneline']) changelog = run_git_command(['git', 'log', f'{previous_tag}..{current_commit}', '--oneline'])
else: else:
# No previous tag, so get the log from the start of the repository # No previous tag, so get the log from the start of the repository