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 support for checksum generation for extra files #2406
feat: add support for checksum generation for extra files #2406
Conversation
@anGie44 is attempting to deploy a commit to the goreleaser Team on Vercel. A member of the Team first needs to authorize it. |
d22c93c
to
8516691
Compare
thanks! |
Codecov Report
@@ Coverage Diff @@
## master #2406 +/- ##
==========================================
- Coverage 82.89% 82.83% -0.07%
==========================================
Files 83 83
Lines 6105 6118 +13
==========================================
+ Hits 5061 5068 +7
- Misses 892 896 +4
- Partials 152 154 +2
Continue to review full report at Codecov.
|
if _, err := os.Stat(path); os.IsNotExist(err) { | ||
return fmt.Errorf("failed to checksum %s: %w", name, err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this check is not needed I think, the extrafiles.Find
would guarantee the file exists...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a couple of comments, looks good to me overall, thanks for the pr and sorry for the late review...
@@ -55,6 +56,22 @@ func (Pipe) Run(ctx *context.Context) (err error) { | |||
return nil | |||
} | |||
|
|||
extraFiles, err := extrafiles.Find(ctx.Config.Checksum.ExtraFiles) | |||
if err != nil { | |||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add a test trying to add a path that don't exist so we cover this branch too?
will fix comments in another commit |
thanks again for the PR :) |
Awesome, thanks @caarlos0 for following up on this work! |
Closes #1898
If applied, this commit will
release
extra_files
Why is this change being made?
Output of
checksums
tests: