Skip to content

Commit

Permalink
testutil/genchangelog: force fetch tags (#2644) (#2647)
Browse files Browse the repository at this point in the history
Always overwrite tags with whatever is available on remote
when generating a changelog.

This has no consequence on tags *pushed* on the repo, but only on
the working copy of the Github action that is executed.
  • Loading branch information
gsora authored Oct 19, 2023
1 parent 98c5f1c commit bd4454d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testutil/genchangelog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ func getFirstMatch(r *regexp.Regexp, s string) (string, bool) {

// getLatestTags returns the latest N git tags.
func getLatestTags(n int) ([]string, error) {
out, err := exec.Command("git", "fetch", "--tags").CombinedOutput()
out, err := exec.Command("git", "fetch", "--tags", "-f").CombinedOutput()
if err != nil {
return nil, errors.Wrap(err, "git fetch", z.Str("out", string(out)))
}
Expand Down

0 comments on commit bd4454d

Please sign in to comment.