Fix release pipeline: escape shell vars so cross-compiled assets build #16
Reference in New Issue
Block a user
Delete Branch "benvin/fix-release-cross-compile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The v0.5.3 release pipeline failed at the asset-upload step with
open node-lookup-linux-amd64: no such file or directory, and release notes came out empty. Woodpecker substitutes${...}expressions incommandsat parse time, treating them as pipeline variables. The build loop's shell parameter expansions (${name},${osarch%/*},${pkg}) and the release step's${PREV_TAG}/${NOTES}were blanked before the shell ran, so the per-os/arch binaries were written to garbled names and never matched the upload list.The RPM itself was unaffected (it's built via
make build, internal to the Makefile) andnode-lookup-0.5.3-1.x86_64.rpmpublished torpm-internalcorrectly — only the Gitea release binary assets and notes were broken.Changes
$$, matching the existingupload-rpmstep's convention. Genuine Woodpecker vars (${CI_COMMIT_TAG},${CI_REPO}) stay single-$.Follow-up
The v0.5.3 Gitea release assets are being backfilled manually; this fix ensures v0.5.4+ produce them automatically.
The v0.5.3 release failed to attach binaries ("open node-lookup-linux-amd64: no such file or directory"). Woodpecker substitutes ${...} expressions in `commands` at parse time, so the build loop's shell parameter expansions (${name}, ${osarch%/*}, ${pkg}) and the release step's ${PREV_TAG}/${NOTES} were blanked before the shell ran — the per-os/arch binaries were written to garbled names and the release notes came out empty. - Escape all shell variables and command substitutions in the build loop and release-notes block as $$, matching the existing upload-rpm step. Real Woodpecker vars (${CI_COMMIT_TAG}, ${CI_REPO}) stay single-$.