diff --git a/tasks/libs/common/git.py b/tasks/libs/common/git.py index 1c90d6f3d7b9e3..2725f404ee16dd 100644 --- a/tasks/libs/common/git.py +++ b/tasks/libs/common/git.py @@ -187,8 +187,10 @@ def get_last_tag(ctx, repo, pattern): ) tags_without_suffix = [line for line in tags.splitlines() if not line.endswith("^{}")] - last_tag = max(tags_without_suffix, key=lambda x: cmp_to_key(semver.compare)(x.split('/')[-1])) - print(f"DEBUG : {last_tag}", file=sys.stderr) + if repo == "datadog-agent-macos-build": + last_tag = tags_without_suffix[-1] + else: + last_tag = max(tags_without_suffix, key=lambda x: cmp_to_key(semver.compare)(x.split('/')[-1])) last_tag_commit, last_tag_name = last_tag.split() tags_with_suffix = [line for line in tags.splitlines() if line.endswith("^{}")] if tags_with_suffix: