Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Goreleaser pulling incorrect tag information #2943

Closed
3 tasks done
stack72 opened this issue Feb 28, 2022 · 7 comments · Fixed by goreleaser/goreleaser-action#329
Closed
3 tasks done

Goreleaser pulling incorrect tag information #2943

stack72 opened this issue Feb 28, 2022 · 7 comments · Fixed by goreleaser/goreleaser-action#329
Assignees
Labels
bug Something isn't working
Milestone

Comments

@stack72
Copy link

stack72 commented Feb 28, 2022

What happened?

In the past 3 days Goreleaser 1.5 has started killing incorrect tag information causing the builds to fail.

Goreleaser now seems to pull an SDK/ tag as the latest tag when previously it ignored these. This has started happening since the latest release of the GitHub Action

previously: https://github.com/pulumi/pulumi-azure-native/runs/5333434160?check_suite_focus=true#step:10:42

now: https://github.com/pulumi/pulumi-azure-native/runs/5358588814?check_suite_focus=true#step:10:43

How can we reproduce this?

Create a tag of a repo vx.x.x and sdk/vx.x.x and Goreleaser gha is failing

goreleaser version

1.5.0 Linux amd

GoReleaser Check

  • goreleaser check shows no errors

Search

  • I did search for other open and closed issues before opening this.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

This seems to be related to the v2.9.0 release of the GitHub action

@stack72 stack72 added bug Something isn't working triage Issue pending triage by one of the maintainers labels Feb 28, 2022
@caarlos0
Copy link
Member

cc/ @crazy-max

I don't see why it started breaking now, though...

in any case, do we really need this? goreleaser/goreleaser-action@v2.8.1...master#diff-4fab5baaca5c14d2de62d8d2fceef376ddddcc8e9509d86cfa5643f51b89ce3dR61

seems to me that, if the user sets it, goreleaser will get it from the parent process, and if doesn't , this is getting in the way of how goreleaser resolves the tag...

that said, I'm fairly confident its not it, as you're actually setting the current tag, and the tag breaking is the previous one.

I can reproduce this by running goreleaser release --rm-dist --snapshot on the master branch.


All that being said, goreleaser itself didn't have a release since a couple of weeks ago, so its more likely something in your repo changed, or maybe the git version being used.

goreleaser gets the current branch and previous branch with:

# Current
git -c log.showSignature=false describe --always --dirty --tags

# Previous
git -c log.showSignature=false describe --tags --abbrev=0 --match=* tags/$CURRENT^

in my local test, both current and previous tags are prefixed with sdk.

@crazy-max
Copy link
Member

Hum looks like there is an issue with GORELEASER_CURRENT_TAG. Will take a look.

@stack72
Copy link
Author

stack72 commented Feb 28, 2022

@caarlos0 we are setting the GORELEASER_CURRENT_TAG but it's not being respected

https://github.com/pulumi/pulumi-azure-native/runs/5358588814?check_suite_focus=true#step:10:31

@caarlos0
Copy link
Member

oh, sorry, I misunderstood...

released @crazy-max's fix at v2.9.1, can you verify @stack72?

@caarlos0 caarlos0 removed the triage Issue pending triage by one of the maintainers label Feb 28, 2022
@caarlos0 caarlos0 added this to the v1.6.0 milestone Feb 28, 2022
@stack72
Copy link
Author

stack72 commented Feb 28, 2022

Will check now @caarlos0 :) thanks to you and @crazy-max

@stack72
Copy link
Author

stack72 commented Feb 28, 2022

Circling back here - sorry for being late - this does indeed fix the issue! thank you

@caarlos0
Copy link
Member

amazing!

thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants