Reputation: 31754
As part of sbt package
, I wish to also generate the pgp
signatures for jar. Note that I do not intend to publish to any repository, but I just want to generate it locally. This can then be used by sbt-pack
to generate a tar of application.
With sbt-pgp
, it generates the pgp signature files with publishLocalSigned
. How do I generate during package
(or any other task)
Upvotes: 1
Views: 34
Reputation: 48430
signedArtifacts
seems to package and sign artifacts without publishing. Analysing its definition we see that packagedArtifacts
and pgpSigner
are the main elements needed to sign a particular artifact:
signedArtifacts := {
val artifacts = packagedArtifacts.value
val r = pgpSigner.value
...
artifacts flatMap {
case (art, file) =>
Seq(art -> file,
subExtension(art, art.extension + gpgExtension) -> r.sign(file, new File(file.getAbsolutePath + gpgExtension), s))
}
...
Upvotes: 1