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

fix: use git-archive under the hood #3904

Merged
merged 9 commits into from
Apr 8, 2023
Merged

fix: use git-archive under the hood #3904

merged 9 commits into from
Apr 8, 2023

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Apr 4, 2023

This reverts back to using git archive for the source archives... but will keep supporting extra files.

How it works:

Basically, we run git archive as before.
Then, we make a backup of the generated archive, and create a new one copying by reading from the backup and writing into the new one.
Finally, we write the extra files to the new one as well.

This only happens if the configuration does have extra files, otherwise, just the simple git archive will be run.

PS: we can't just append to the archive because weird tar format paddings et al.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 added bug Something isn't working enhancement New feature or request labels Apr 4, 2023
@caarlos0 caarlos0 self-assigned this Apr 4, 2023
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 4, 2023
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@cloudflare-pages
Copy link

cloudflare-pages bot commented Apr 4, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2e205a2
Status: ✅  Deploy successful!
Preview URL: https://f222792e.goreleaser.pages.dev
Branch Preview URL: https://source-archive-edit.goreleaser.pages.dev

View logs

@codecov
Copy link

codecov bot commented Apr 7, 2023

Codecov Report

Merging #3904 (2e205a2) into main (57d3bdd) will decrease coverage by 0.22%.
The diff coverage is 73.44%.

@@            Coverage Diff             @@
##             main    #3904      +/-   ##
==========================================
- Coverage   83.77%   83.56%   -0.22%     
==========================================
  Files         123      124       +1     
  Lines       10732    10884     +152     
==========================================
+ Hits         8991     9095     +104     
- Misses       1397     1433      +36     
- Partials      344      356      +12     
Impacted Files Coverage Δ
internal/pipe/archive/archive.go 92.76% <ø> (-0.13%) ⬇️
pkg/config/config.go 95.21% <ø> (ø)
pkg/archive/zip/zip.go 67.03% <63.41%> (-3.56%) ⬇️
internal/pipe/sourcearchive/source.go 72.16% <71.05%> (-8.61%) ⬇️
pkg/archive/tar/tar.go 74.64% <71.42%> (-1.83%) ⬇️
pkg/archive/targz/targz.go 77.77% <75.00%> (-2.23%) ⬇️
internal/testlib/archive.go 78.57% <78.57%> (ø)
pkg/archive/archive.go 100.00% <100.00%> (ø)

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>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 merged commit 0eb3e79 into main Apr 8, 2023
10 of 12 checks passed
@caarlos0 caarlos0 deleted the source-archive-edit branch April 8, 2023 01:53
@github-actions github-actions bot added this to the v1.17.0 milestone Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 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.

None yet

1 participant