Skip to content

Commit 47802f3

Browse files
committed
Fix setupGpg
1 parent d385a46 commit 47802f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: project/CIRelease.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ object CiReleasePlugin extends AutoPlugin {
2828

2929
def setupGpg(): Unit = {
3030
val secret = sys.env("PGP_SECRET")
31+
val passphrase = sys.env("PGP_PASSPHRASE")
3132
(s"echo $secret" #| "base64 --decode" #| "gzip -d" #| "gpg --batch --import").!
3233
// The first time you use `gpg --passphrase` the agent prompts for a password nevertheless
3334
// The `--pinentry-mode loopback` flag seems to do the trick, but we cannot inject it in sbt-pgp
3435
// so we're running a dummmy gpg signature here so that we won't be asked for the passphrase later
35-
("echo dummy" #| s"gpg --pinentry-mode loopback --batch --passphrase $secret --no-default-keyring --keyring /root/.gnupg/pubring.kbx --detach-sign --armor --use-agent").!
36+
("echo dummy" #| s"gpg --pinentry-mode loopback --batch --passphrase $passphrase --no-default-keyring --keyring /root/.gnupg/pubring.kbx --detach-sign --armor --use-agent").!
3637
}
3738

3839
override def buildSettings: Seq[Def.Setting[_]] = List(

0 commit comments

Comments
 (0)