New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a source tarball with vendored dependencies #172
Comments
I've just went through the same exercise for my own project, I wasn't correct in suggesting to use I can see you are using
tmp=$(mktemp -d)
mkdir $tmp/croc
cp -r * $tmp/croc
(cd $tmp/croc && go mod tidy && go mod vendor)
(cd $tmp && tar -cvzf croc-src.tar.gz croc)
mv $tmp/croc-src.tar.gz dist/ I'm not sure based on the medium article, maybe there must be a subfolder in ...
mkdir -p dist/src
mv $tmp/croc-src.tar.gz dist/src/ Hope that helps 🙂 |
@maximbaz Thanks! I got it working, but I'm not sure how to upload the prepared tarball to Github via goreleaser. Waiting on that :) |
I think it worked, looking at the 6.2.4 release I can see UPDATE: Or did you mean that you uploaded A minor annoyance is that I'll check now on my side if I can build using that archive, will report in a few minutes |
It worked really well for me, my build script can compile the binary and run all your tests without downloading anything from internet, awesome! |
@maximbaz Great, but I actually uploaded that src manually. I still have to figure out how to integrate into goreleaser |
I bet the trick is to update the line |
According to their slack, there is no way to do this :( I will just upload manually when I can! |
Oh really 😞 But thanks! I'll update Arch package to use |
@maximbaz Nvm! I added it to the post-hook. All good now :) |
looks like this broke @schollz, there is no |
@maximbaz Sorry, added! |
Thanks! Did you need to do this manually? If hooks don't work as expected we can try to find some other way, to make it simpler for you! |
Hi @schollz, the latest |
Hey, would you be able to provide one more archive as part of your release, a source tarball just like Github is building for you (source.tar.gz) but with vendored dependencies? These can be generated using
go mod tidy; go mod vendor
commands.I want this to allow building
croc
in a clean environment without internet access (assuming source tarball is already present), which might for example help with reproducible builds effort.To generate a tarball you can use
git
directly, for example Github itself is running this command (where the last argument is the tag name):Let me know if this makes sense and if I can help with something!
The text was updated successfully, but these errors were encountered: