Skip to content

Conversation

@wallrj
Copy link
Member

@wallrj wallrj commented Jul 10, 2025

We're using a really old version of goreleaser and I hope that updating to the latest version will fix the following problems that I'm noticing with the gitlab releases for some internal CA projects:

  • Broken links to release artifacts. All the goreleaser release artifacts result in a 404 error wen clicked.
  • Creates release notes relative to previous pre-release versions rather than relative to the last minor or patch version.
  • When two tags reference the same commit, goreleaser was using the semantically lower tag and failing. For example with v1.21.0-alpha.1 and v1.21.0, because it had already created release artifacts for the alpha release and was trying to create the same release again rather than v1.21.0

https://github.com/goreleaser/goreleaser/releases/tag/v2.11.0

Testing

In cert-manager/cmctl#247 I created a test release:

I tested the resulting cmctl binary as follows:

curl -fsSL -O https://github.com/cert-manager/cmctl/releases/download/v2.3.0-alpha.1/cmctl_linux_amd64
chmod +x cmctl_linux_amd64
mv cmctl_linux_amd64 ~/.local/bin/
kind create cluster
cmctl x install
cmctl version -o yaml
clientVersion:
  compiler: gc
  gitCommit: 262bd50637c41abdf37bf3821472a62f318f225f
  gitTreeState: ""
  gitVersion: v2.3.0-alpha.1
  goVersion: go1.24.5
  platform: linux/amd64
serverVersion:
  detected: v1.18.2
  sources:
    crdLabelVersion: v1.18.2

@cert-manager-prow cert-manager-prow bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 10, 2025
@wallrj wallrj marked this pull request as draft July 10, 2025 12:13
@cert-manager-prow cert-manager-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 10, 2025
https://github.com/goreleaser/goreleaser/releases/tag/v2.11.0

Signed-off-by: Richard Wall <richard.wall@cyberark.com>
$(YQ) 'with(.builds[]; select(.id == "$(1)") | .ldflags[1] = "-w")' | \
$(YQ) 'with(.builds[]; select(.id == "$(1)") | .ldflags[2] = "$(go_$1_ldflags)")' | \
$(YQ) 'with(.builds[]; select(.id == "$(1)") | .gobinary = "$(GO)")' | \
$(YQ) 'with(.builds[]; select(.id == "$(1)") | .tool = "$(GO)")' | \
Copy link
Member Author

Choose a reason for hiding this comment

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

https://goreleaser.com/deprecations/#buildsgobinary

For example:

  • setting defaults
    • DEPRECATED: builds.gobinary should not be used anymore, check https://goreleaser.com/deprecations#buildsgobinary for more info

@wallrj wallrj marked this pull request as ready for review July 10, 2025 15:12
@cert-manager-prow cert-manager-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 10, 2025
@wallrj wallrj requested a review from inteon July 10, 2025 15:13
@wallrj
Copy link
Member Author

wallrj commented Jul 10, 2025

/hold until I've verified this works with Gitlab based internal projects.

@cert-manager-prow cert-manager-prow bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 10, 2025
@inteon
Copy link
Member

inteon commented Jul 10, 2025

/approve
/lgtm

Thank you for upgrading this!

@cert-manager-prow cert-manager-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2025
@cert-manager-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: inteon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 10, 2025
@wallrj
Copy link
Member Author

wallrj commented Jul 11, 2025

Verified that it works for internal projects too.

/unhold

@cert-manager-prow cert-manager-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 11, 2025
@cert-manager-prow cert-manager-prow bot merged commit e869982 into cert-manager:main Jul 11, 2025
4 checks passed
@wallrj wallrj deleted the goreleaser-v2 branch July 11, 2025 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants