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
Optionally run go mod vendor
for source archives?
#2911
Comments
not sure if its possible... we use not sure if there's a way around this... |
Hmm. We could remove https://stackoverflow.com/a/54036395/846934 suggests maybe we can just throw |
That's assuming tar, but it could be a myriad of formats. You could, in theory, remove vendor from the gitignore, and run The vendor folder will be used to build - which shouldn't be a big deal, and will also be included in the source archive |
The |
ah, indeed |
then, if we do this, we might need to implement the archiving ourselves instead of relying on |
I think you could still piggy back on |
seems to be in alpha, and at least on readme there is no example on how to add files with specific permissions, correct? I need to test, but maybe our internal archiving library already works :P |
I did test, it did not work |
I think the easiest way would probably be to do the whole git-archive thing on goreleaser itself (using git ls-files et al). Will try to work on this for next release. |
would be used in #2911 Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* refactor: evaluate archive files in another package would be used in #2911 Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * test: fixes Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
impl it with |
closes #2911 Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
`--add-file` adds only the `--prefix` joined with the basename of the added file, so, adding a folder like `vendor` would break havoc. this basically writes our own source archives (which are more compressed) and allows to add an entire folder easily, as well as other mappings as `archives` already supports. refs #3102 #2911 Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Sweet, thanks! Just so I understand, should we use |
Has to do it the first way I was thinking of doing, check #3343 |
Sorry I'm not sure I follow. Do you mean "yes, use |
The flag is a |
correct @mohammed90 , the docs are already up to date (but the version with this is not released yet) |
My question was more about whether we should use |
ah, I believe just |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Is your feature request related to a problem? Please describe.
We were asked on the Caddy project caddyserver/caddy#4573 to provide a source bundle including vendored dependencies, so that builds can be produced without additional downloads.
Describe the solution you'd like
An optional flag like
vendor: true
in https://goreleaser.com/customization/source/ would be great. It should rungo mod vendor
to produce thevendor/
dir in the project before zipping up the source.Describe alternatives you've considered
It would let us avoid having to write some custom shell script after the release to produce the extra tarball.
Search
Code of Conduct
Additional context
No response
The text was updated successfully, but these errors were encountered: