chore: replace mitchellh/gox with goreleaser#31343
Conversation
63f8cf0 to
c01ac8b
Compare
mattfarina
left a comment
There was a problem hiding this comment.
Thanks for working on this. I tried to use it and ran into some issues. Can you please clean these up?
dadab9e to
ae7b2f3
Compare
|
This is ready for another look. |
|
This is a great improvement. I’m wondering if the next step is to use GoReleaser to also publish artifacts on GitHub, so we have a backup when Azure experiences downtime, as it did twice this month. Related: |
There was a problem hiding this comment.
Nice work!
There is a minor difference in the produced archives, ie.:
# goreleaser
helm $ tar -tvf _dist/helm-4.0.0-next-windows-amd64.tar.gz
-rw-r--r-- 0 gjenkins8 staff 11373 Nov 5 2022 LICENSE
-rw-r--r-- 0 gjenkins8 staff 4540 Oct 1 14:13 README.md
-rwxr-xr-x 0 gjenkins8 staff 67098112 Oct 31 07:11 windows-amd64/helm.exe
# gox
helm $ tar -tvf _dist/helm-4.0.0-next-windows-amd64.tar.gz
drwxr-xr-x 0 gjenkins8 staff 0 Oct 31 07:30 windows-amd64/
-rw-r--r-- 0 gjenkins8 staff 11373 Oct 31 07:30 windows-amd64/LICENSE
-rw-r--r-- 0 gjenkins8 staff 4540 Oct 31 07:30 windows-amd64/README.md
-rwxr-xr-x 0 gjenkins8 staff 67101184 Oct 31 07:30 windows-amd64/helm.exe
the LICENSE and README.md files are no longer in the same directory as the binary. But I think this is fine (and probably expected today)
LGTM
51597d6 to
52377b7
Compare
scottrigby
left a comment
There was a problem hiding this comment.
goreleaser is a good move.
My main question is, should we configure gorelaser to keep the same file pattern we have now for checksums (including .asc sig info per checksum file), as opposed to a single file containing all checksums?
Also, we should make any needed changes in scripts/get-helm-4 in this same PR.
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
52377b7 to
eaa0910
Compare
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR replaces the archived mitchellh/gox-based cross-build/release flow with GoReleaser, wiring make build-cross/make dist to GoReleaser and adding a .goreleaser.yaml configuration.
Changes:
- Swap Makefile cross-build and dist packaging from
goxtogoreleaser. - Add
.goreleaser.yamlto define the build matrix and archive generation. - Update the canary release GitHub Actions job to call
make distwithout a separatemake build-cross.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| Makefile | Replaces gox install and usage with goreleaser for cross-build and dist. |
| .goreleaser.yaml | Introduces GoReleaser configuration for builds/archives/checksums. |
| .github/workflows/release.yml | Adjusts canary job build step to rely on make dist instead of make build-cross. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
|
@scottrigby Good catches — addressed in the latest commits:
|
1 similar comment
|
@scottrigby Good catches — addressed in the latest commits:
|
…rchive names Signed-off-by: Terry Howe <terrylhowe@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
|
Branch (goreleaser) vs Main (gox) — VERSION=v4.1.0 Archive naming — both correct ✅ Both produce helm-v4.1.0-linux-amd64.tar.gz with the v prefix. The GORELEASER_CURRENT_TAG=$(VERSION) fix works. Zip files — now aligned ✅ The branch correctly restricts zip to Windows. Main's make dist calls zip on every platform directory indiscriminately. Checksum files — branch has them, main's build had issues Branch creates per-archive .sha256 and .sha256sum: No checksums.txt on branch ✅ The checksum: disable: true fix works — no aggregate file. Goreleaser puts LICENSE and README.md at the archive root; gox puts them inside the OS-ARCH/ subdirectory. This was noted New platform on branch ✅ Branch adds linux-loong64 (from PR #31338 merged to main). Not a regression — main just predates that merge. Extra goreleaser metadata files Branch produces artifacts.json, config.yaml, metadata.json in _dist/. These are goreleaser internals and aren't uploaded Summary After all the fixes, the branch output is functionally correct and closely matches main's intent. The only intentional |
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
goreleaser v2 has a bug with no_unique_dist_dir where it registers archive tasks for all sub-arch variants even when constraints limit builds to one per arch, causing archive collision errors. Switch dist target to use goreleaser build (binaries only) and create tar.gz/zip archives manually, copying LICENSE and README.md into each platform directory to match the existing archive structure. Add sub-arch constraints (goamd64, goarm64, go386, goriscv64) to ensure only one variant is built per architecture. Signed-off-by: Terry Howe <terrylhowe@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
sabre1041
left a comment
There was a problem hiding this comment.
LGTM
With goreleaser now available, there are additional options that we can look to both deprecate some of the make targets as well as add new capabilities
What this PR does / why we need it:
Replace archived mitchellh/gox with goreleaser
Closes: #30913
Closes: #30896
Closes: #12707
Special notes for your reviewer:
If applicable:
docs neededlabel should be applied if so)