Skip to content

Conversation

EnriqueL8
Copy link
Contributor

@peterbroadhurst
Copy link
Contributor

ok - reading to understand why it's picking pre-release

@peterbroadhurst
Copy link
Contributor

So we run goreleaser for both prerelease and not, and it sets the appropriate tag in the go system it seems https://goreleaser.com/customization/release/#github

@peterbroadhurst
Copy link
Contributor

ok - so here's the description of the option that's been picked, and it says this is about more than one tag in the same commit 👀

  # What should be used to sort tags when gathering the current and previous
  # tags if there are more than one tag in the same commit.
  #
  # Default: '-version:refname'.
  tag_sort: -version:creatordate

@peterbroadhurst
Copy link
Contributor

So I think @EnriqueL8 - you're saying we:

  1. Tagged a commit of the CLI as v1.3.3-rc.1
  2. Chose to re-tag the very same commit as v1.3.3
    • We must never have done this before
  3. Tried to run go-releaser again, and it failed

@peterbroadhurst
Copy link
Contributor

So... actually you will need to "un tag" the current commit as v1.3.3 (because this fix is a new commit), then tag the commit after this builds as v1.3.3.

That will render this fix void for this release (because there won't be duplicate tags on a commit any more), but will mean future releases don't hit this.

@EnriqueL8
Copy link
Contributor Author

Exactly! As there weren't any fixes needed between the RC and the final version we have retagged the same commit with a newer tag. The GoReleaser would take the oldest one and that flag sorts by creation time so it take the first one.

As you said, need to go delete the v1.3.3 tag, merge this fix and then release v1.3.3 again pointing at a new commit so we wouldn't hit this issue but fix it for the future :)

Copy link
Contributor

@peterbroadhurst peterbroadhurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked and it seems you've deleted the v1.3.3 release

@EnriqueL8 EnriqueL8 merged commit aa98292 into main Mar 25, 2025
12 checks passed
@EnriqueL8 EnriqueL8 deleted the fix_go_releaser branch March 25, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants