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: create tree of dir content types #431
Conversation
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
This solution assumes that the contents are sorted because by creating the parent tree of Now we do sort the contents, but in a completely different package. Keep in mind that just assuming order in the packagers might be a huge foot gun for those that use |
Codecov Report
@@ Coverage Diff @@
## main #431 +/- ##
==========================================
- Coverage 66.73% 66.52% -0.22%
==========================================
Files 15 15
Lines 1876 1882 +6
==========================================
Hits 1252 1252
- Misses 487 491 +4
- Partials 137 139 +2
Continue to review full report at Codecov.
|
indeed, should we maybe sort the files in a different place then (in each impl)? or add a godoc saying "if you use this directly you'll need to sort the files first"? thoughts? |
Well we already create the tree of the I think the best solution would require some refactoring: We should build the actual tar contents first without writing them. Then each content entry can decide if it should overwrite existing entries or not. Like |
that seems like a rather big refactor... I think I'll release this as-is to fix the bug, and create an issue so we can investigate it in the future |
refs goreleaser/goreleaser#2792