Skip to content

Commit

Permalink
Correctly get the latest tag when there's multiple pointing to a commit
Browse files Browse the repository at this point in the history
  • Loading branch information
billyb2 committed Jul 2, 2024
1 parent e0f2666 commit b21eaf2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/version/relmeta/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ func (r *gitRepo) currentTag(sha string) (string, error) {
if err != nil {
return "", err
}
return strings.TrimSpace(out), nil
outNoNL := strings.Split(out, "\n")
return strings.TrimSpace(outNoNL[len(outNoNL)-1]), nil
}

func (r *gitRepo) previousTagOnChannel(channel string, semverOnly bool) (string, error) {
Expand Down

0 comments on commit b21eaf2

Please sign in to comment.