build: Clean up Goreleaser change#32098
Conversation
Makefile: - restore dist target - remove unused TARGETS var gh release action: - restore build-cross to release and canary-release jobs Signed-off-by: Scott Rigby <scott@r6by.com>
There was a problem hiding this comment.
Pull request overview
This PR tidies up the post-#31343 GoReleaser-based release flow by reintroducing a dist packaging step in the Makefile and ensuring the GitHub release workflow runs the cross-build step before packaging.
Changes:
- Remove the unused
TARGETSvariable from the Makefile. - Rework
make distto package already-built_dist/<os>-<arch>/directories (instead of invoking GoReleaser itself). - Update the release workflow to run
make build-crossbeforemake dist checksum.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| Makefile | Removes unused build variable and changes dist to package _dist outputs (tar/zip + add LICENSE/README). |
| .github/workflows/release.yml | Restores make build-cross in release and canary-release jobs before packaging/checksums. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cd _dist && \ | ||
| $(DIST_DIRS) cp ../LICENSE {} \; && \ | ||
| $(DIST_DIRS) cp ../README.md {} \; && \ | ||
| $(DIST_DIRS) tar -zcf helm-${VERSION}-{}.tar.gz {} \; && \ | ||
| $(DIST_DIRS) zip -r helm-${VERSION}-{}.zip {} \; \ |
There was a problem hiding this comment.
subdirectories will not exist here. no need to over-engineer. we will be rewriting this part of the build process at some point so keeping changes targeted.
| @@ -177,19 +176,14 @@ build-cross: $(GORELEASER) | |||
|
|
|||
| .PHONY: dist | |||
| dist: LDFLAGS += -extldflags "-static" | |||
There was a problem hiding this comment.
| dist: LDFLAGS += -extldflags "-static" |
nit
There was a problem hiding this comment.
missed that this from the revert of that target, thanks. Also saw copilot noticed this - but somehow I did not 😅
Co-authored-by: Terry Howe <terrylhowe@gmail.com> Signed-off-by: Scott Rigby <scott@r6by.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| - name: Build Helm Binaries | ||
| run: | | ||
| make build-cross VERSION="${{ github.ref_name }}" |
There was a problem hiding this comment.
good find. this was my selective revert mistake. fixed in 0a1e03f
Signed-off-by: Scott Rigby <scott@r6by.com>
Cleans up #31343
What this PR does / why we need it:
#31343 was a much needed step in cleaning up our old build process. However through much back and forth, some unneeded changes were left.
Special notes for your reviewer:
Makefile:
gh release action:
If applicable:
docs neededlabel should be applied if so)