build: remove install hooks from release dist#812
build: remove install hooks from release dist#812haatveit wants to merge 1 commit intodatabus23:masterfrom
Conversation
This commit removes the hooks section from plugin.yaml when staging it for release in the dist target, as the script referenced there is not bundled as part of releases, and also not needed. This fixes databus23#504.
There was a problem hiding this comment.
Pull request overview
Removes Helm plugin install/update hooks from the plugin.yaml that gets staged into release tarballs, since the hook script isn’t bundled in release archives and causes helm plugin install to fail (issue #504).
Changes:
- Stop copying
plugin.yamlverbatim intobuild/diff. - Generate
build/diff/plugin.yamlfromplugin.yamlwith the entire top-levelhooks:section stripped viaawk.
| cp README.md LICENSE build/diff | ||
| awk '/^hooks:/ { in_hooks = 1; next } in_hooks && /^[^[:space:]]/ { in_hooks = 0 } !in_hooks { print }' plugin.yaml > build/diff/plugin.yaml |
There was a problem hiding this comment.
This change updates the make dist packaging, but the repo's GitHub Releases are currently produced by GoReleaser (see .github/workflows/release.yaml), which still archives plugin.yaml as-is (with hooks) and does not include install-binary.sh. As a result, the published helm-diff-*.tgz artifacts will likely continue to fail helm plugin install the same way (#504). Consider either (a) updating GoReleaser packaging to drop the hooks section for release archives, or (b) adding install-binary.sh to the archived files, or (c) switching the release workflow to run make dist and upload release/*.tgz.
This commit removes the hooks section from plugin.yaml when staging it for release in the dist target, as the script referenced there is not bundled as part of releases, and also not needed.
This fixes #504.
(I hope this Makefile target is actually what you still use to prepare releases, under the release assets there are files like
helm-diff-freebsd-arm64.tgzthat aren't being built here.)