Skip to content

Commit d5f9033

Browse files
authored
Reload gpg key files after creating them, fixes #64 (#66)
Reload gpg key files after creating them, fixes #64
2 parents 8ba6b45 + d229483 commit d5f9033

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

plugin/src/main/scala/com/geirsson/CiReleasePlugin.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,14 @@ object CiReleasePlugin extends AutoPlugin {
7373
s" TRAVIS_TAG=$travisTag"
7474
)
7575
setupGpg()
76+
// https://github.com/olafurpg/sbt-ci-release/issues/64
77+
val reloadKeyFiles =
78+
"; set pgpSecretRing := pgpSecretRing.value; set pgpPublicRing := pgpPublicRing.value"
7679
if (!isTravisTag) {
7780
if (isSnapshotVersion(currentState)) {
7881
println(s"No tag push, publishing SNAPSHOT")
79-
sys.env.getOrElse("CI_SNAPSHOT_RELEASE", "+publish") ::
82+
reloadKeyFiles ::
83+
sys.env.getOrElse("CI_SNAPSHOT_RELEASE", "+publish") ::
8084
currentState
8185
} else {
8286
// Happens when a tag is pushed right after merge causing the master branch
@@ -88,7 +92,8 @@ object CiReleasePlugin extends AutoPlugin {
8892
}
8993
} else {
9094
println("Tag push detected, publishing a stable release")
91-
sys.env.getOrElse("CI_RELEASE", "+publishSigned") ::
95+
reloadKeyFiles ::
96+
sys.env.getOrElse("CI_RELEASE", "+publishSigned") ::
9297
sys.env.getOrElse("CI_SONATYPE_RELEASE", "sonatypeBundleRelease") ::
9398
currentState
9499
}

0 commit comments

Comments
 (0)