Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Pythyu committed Aug 9, 2024
1 parent 29acf63 commit f934879
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tasks/libs/common/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ def get_last_tag(ctx, repo, pattern):
from functools import cmp_to_key

import semver
import sys

tags = ctx.run(
rf'git ls-remote -t https://github.com/DataDog/{repo} "{pattern}"',
Expand All @@ -187,7 +188,7 @@ 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(last_tag)
print(f"DEBUG : {last_tag}", file=sys.stderr)
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:
Expand Down

0 comments on commit f934879

Please sign in to comment.