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

Added gpgWarnOnFailure #6

Merged
merged 4 commits into from
Aug 15, 2018

Conversation

djspiewak
Copy link
Collaborator

@djspiewak djspiewak commented Aug 10, 2018

Feel free to bikeshed the name! This adds a new key, gpgWarnOnFailure, which is scoped to Zero and publishLocal. In publishLocal it is defaulted to true, and everywhere else it defaults to false. A value of true will override the default behavior and allow publication to succeed even if signing fails. A value of false corresponds to "fail on failure" and will result in the build halting if signing cannot be completed successfully.

Oh I also fixed a previously-undiscovered bug when gpgWarnOnFailure := true and signing fails for not-the-first file. Previously, the warning would report that "Artifacts won't be signed", but in fact some of the signatures would have still been published. The behavior is now consistent with the error message: when any files fail to sign, no signatures are published.

Also as a bonus, I fixed gpg's process output to redirect fully to SBT's logging. This always annoyed me about gpg from within sbt-pgp.

Fixes #3

@jodersky
Copy link
Owner

thanks for working on this! I'm about to head out to a trip this weekend without any connectivity, but I'll take a more detailed look when I get back

@jodersky
Copy link
Owner

Thanks, this is really nice! (I also appreciate the typo fixes and best practice recommendations 😄 )

@jodersky jodersky merged commit becc47c into jodersky:master Aug 15, 2018
@jodersky
Copy link
Owner

Released in version 0.2.0, which should be published to maven central when the build completes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for failing the build in the event signing failed
2 participants