Is There a Better Way to Include Files Outside the Repository in GoReleaser Archives? #5313
-
I'm currently using GoReleaser and need to include a file ( archives:
- id: cel_wasm
builds: [cel_wasm]
format: zip
files:
- dist/assets/wasm_exec.js
hooks:
before:
- mkdir -p dist/assets
- cp '{{ .Env.GOROOT }}/misc/wasm/wasm_exec.js' dist/assets/ This approach works, but I'm wondering if there's a cleaner or more efficient way to achieve this. Specifically:
Looking forward to hearing your thoughts and suggestions! Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey! Yeah, that is a good way to do it. You could also copy it to the root of the repo and add it to gitignore, which would also solve your 3rd point there. GoReleaser doesn't have a feature to automatically import files that way, but it is a good suggestion, I think. Might be worth investigating 📓 The path looks correct to me, if the archive isn't right, you can also use something like: archives:
-
files:
- src: dist/assets/wasm_exec.js
dst: ./path/to/wasm_exec.js Hope that helps! |
Beta Was this translation helpful? Give feedback.
Hey!
Yeah, that is a good way to do it. You could also copy it to the root of the repo and add it to gitignore, which would also solve your 3rd point there.
GoReleaser doesn't have a feature to automatically import files that way, but it is a good suggestion, I think. Might be worth investigating 📓
The path looks correct to me, if the archive isn't right, you can also use something like:
Hope that helps!