Skip to content
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

feat: add extra files to source archives #3102

Merged
merged 9 commits into from Aug 25, 2022
Merged

feat: add extra files to source archives #3102

merged 9 commits into from Aug 25, 2022

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented May 12, 2022

closes #2911

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 self-assigned this May 12, 2022
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 12, 2022
@caarlos0 caarlos0 added the enhancement New feature or request label May 12, 2022
@caarlos0 caarlos0 marked this pull request as ready for review May 12, 2022 01:57
@vercel vercel bot temporarily deployed to Preview May 12, 2022 01:58 Inactive
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview May 12, 2022 02:03 Inactive
@codecov
Copy link

codecov bot commented May 12, 2022

Codecov Report

Merging #3102 (d3039a4) into main (6778972) will decrease coverage by 0.01%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##             main    #3102      +/-   ##
==========================================
- Coverage   83.94%   83.93%   -0.02%     
==========================================
  Files         115      115              
  Lines        9180     9210      +30     
==========================================
+ Hits         7706     7730      +24     
- Misses       1200     1204       +4     
- Partials      274      276       +2     
Impacted Files Coverage Δ
pkg/config/config.go 95.21% <ø> (ø)
internal/pipe/sourcearchive/source.go 87.67% <80.00%> (-5.36%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview May 12, 2022 02:36 Inactive
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview August 10, 2022 03:18 Inactive
@vercel vercel bot temporarily deployed to Preview August 25, 2022 03:18 Inactive
@vercel vercel bot temporarily deployed to Preview August 25, 2022 03:48 Inactive
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview August 25, 2022 03:51 Inactive
@vercel vercel bot temporarily deployed to Preview August 25, 2022 03:58 Inactive
@caarlos0 caarlos0 merged commit e67975e into main Aug 25, 2022
@caarlos0 caarlos0 deleted the source-extra branch August 25, 2022 04:10
@github-actions github-actions bot added this to the 1.11.0 milestone Aug 25, 2022
@caarlos0
Copy link
Member Author

actually, this has a "small" issue:

--add-file=<file>
Add a non-tracked file to the archive. Can be repeated to add multiple files. The path of the file in the archive is built by concatenating the value of the last --prefix option (if any) before this --add-file and the basename of <file>.

basename of file only... which means adding a vendor will not work... will rework this using my previous approach..

caarlos0 added a commit that referenced this pull request Aug 25, 2022
refs #3102 #2911

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
caarlos0 added a commit that referenced this pull request Aug 25, 2022
`--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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optionally run go mod vendor for source archives?
1 participant