Skip to content

Commit 5687b18

Browse files
authored
Merge pull request #7193 from dotty-staging/upgrade-sbt-sonatype-pgp
Upgrade sbt-sonatype, sbt-pgp
2 parents 7b8f63f + 0722cb6 commit 5687b18

File tree

4 files changed

+21
-24
lines changed

4 files changed

+21
-24
lines changed

.drone.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ steps:
2727

2828
- name: test
2929
pull: default
30-
image: lampepfl/dotty:2019-08-22
30+
image: lampepfl/dotty:2019-09-10
3131
depends_on: [ clone ]
3232
commands:
3333
- cp -R . /tmp/1/ && cd /tmp/1/
@@ -36,7 +36,7 @@ steps:
3636

3737
- name: test_bootstrapped
3838
pull: default
39-
image: lampepfl/dotty:2019-08-22
39+
image: lampepfl/dotty:2019-09-10
4040
depends_on: [ clone ]
4141
commands:
4242
- cp -R . /tmp/2/ && cd /tmp/2/
@@ -45,7 +45,7 @@ steps:
4545

4646
- name: community_build
4747
pull: default
48-
image: lampepfl/dotty:2019-08-22
48+
image: lampepfl/dotty:2019-09-10
4949
depends_on: [ clone ]
5050
commands:
5151
- cp -R . /tmp/3/ && cd /tmp/3/
@@ -54,7 +54,7 @@ steps:
5454

5555
- name: test_sbt
5656
pull: default
57-
image: lampepfl/dotty:2019-08-22
57+
image: lampepfl/dotty:2019-09-10
5858
depends_on: [ clone ]
5959
commands:
6060
- cp -R . /tmp/4/ && cd /tmp/4/
@@ -66,7 +66,7 @@ steps:
6666

6767
- name: test_java11
6868
pull: default
69-
image: lampepfl/dotty:2019-08-22
69+
image: lampepfl/dotty:2019-09-10
7070
depends_on: [ clone ]
7171
commands:
7272
- export PATH="/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH"
@@ -80,7 +80,7 @@ steps:
8080

8181
- name: documentation
8282
pull: default
83-
image: lampepfl/dotty:2019-08-22
83+
image: lampepfl/dotty:2019-09-10
8484
depends_on:
8585
- test
8686
- test_bootstrapped
@@ -99,15 +99,15 @@ steps:
9999

100100
- name: publish_nightly
101101
pull: default
102-
image: lampepfl/dotty:2019-08-22
102+
image: lampepfl/dotty:2019-09-10
103103
depends_on:
104104
- test
105105
- test_bootstrapped
106106
- community_build
107107
- test_sbt
108108
- test_java11
109109
commands:
110-
- ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease"
110+
- ./project/scripts/sbtPublish ";project dotty-bootstrapped ;publishSigned ;sonatypeBundleRelease"
111111
environment:
112112
NIGHTLYBUILD: yes
113113
PGP_PW:
@@ -126,7 +126,7 @@ steps:
126126

127127
- name: publish_release
128128
pull: default
129-
image: lampepfl/dotty:2019-08-22
129+
image: lampepfl/dotty:2019-09-10
130130
depends_on:
131131
- test
132132
- test_bootstrapped
@@ -135,7 +135,7 @@ steps:
135135
- test_java11
136136
commands:
137137
- ./project/scripts/sbt dist-bootstrapped/packArchive
138-
- ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease"
138+
- ./project/scripts/sbtPublish ";project dotty-bootstrapped ;publishSigned ;sonatypeBundleRelease"
139139
environment:
140140
PGP_PW:
141141
from_secret: pgp_pw
@@ -169,15 +169,15 @@ steps:
169169

170170
- name: publish_sbt_release
171171
pull: default
172-
image: lampepfl/dotty:2019-08-22
172+
image: lampepfl/dotty:2019-09-10
173173
depends_on:
174174
- test
175175
- test_bootstrapped
176176
- community_build
177177
- test_sbt
178178
- test_java11
179179
commands:
180-
- ./project/scripts/sbtPublish ";sbt-dotty/publishSigned ;sonatypeRelease"
180+
- ./project/scripts/sbtPublish ";project sbt-dotty ;publishSigned ;sonatypeBundleRelease"
181181
environment:
182182
PGP_PW:
183183
from_secret: pgp_pw

project/Build.scala

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import sbt.plugins.SbtPlugin
1313
import sbt.ScriptedPlugin.autoImport._
1414
import xerial.sbt.pack.PackPlugin
1515
import xerial.sbt.pack.PackPlugin.autoImport._
16+
import xerial.sbt.Sonatype.autoImport._
1617

1718
import dotty.tools.sbtplugin.DottyPlugin.autoImport._
1819
import dotty.tools.sbtplugin.DottyPlugin.makeScalaInstance
@@ -198,7 +199,8 @@ object Build {
198199
password <- sys.env.get("SONATYPE_PW")
199200
} yield Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", username, password)
200201
).toList,
201-
PgpKeys.pgpPassphrase := sys.env.get("PGP_PW").map(_.toCharArray())
202+
PgpKeys.pgpPassphrase := sys.env.get("PGP_PW").map(_.toCharArray()),
203+
PgpKeys.useGpgPinentry := true,
202204
)
203205

204206
lazy val commonSettings = publishSettings ++ Seq(
@@ -1150,12 +1152,7 @@ object Build {
11501152
lazy val publishSettings = Seq(
11511153
publishMavenStyle := true,
11521154
isSnapshot := version.value.contains("SNAPSHOT"),
1153-
publishTo := Some(
1154-
if (isSnapshot.value)
1155-
Opts.resolver.sonatypeSnapshots
1156-
else
1157-
Opts.resolver.sonatypeStaging
1158-
),
1155+
publishTo := sonatypePublishToBundle.value,
11591156
publishArtifact in Test := false,
11601157
homepage := Some(url(dottyGithubUrl)),
11611158
licenses += ("BSD New",

project/plugins.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0-M8")
66

7-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.1")
7+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.6")
88

9-
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")
9+
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0-M2")
1010

1111
addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.10.1")
1212

project/scripts/sbtPublish

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ if [ ! "$NIGHTLYBUILD" = "yes" ] && [ ! "$RELEASEBUILD" = "yes" ]; then
1818
exit 1
1919
fi
2020

21-
# Write down PGP secret key to the location expected by sbt-pgp
22-
mkdir -p "$HOME/.sbt/gpg"
23-
echo "$PGP_SECRET" > "$HOME/.sbt/gpg/secring.asc"
21+
# Setup gpg
22+
export GPG_TTY="$(tty)"
23+
echo "$PGP_SECRET" | gpg --batch --import
2424

2525
# run sbt with the supplied arg
2626
SBT="$(cd "$(dirname "${BASH_SOURCE[0]}")" >& /dev/null && pwd)/sbt"

0 commit comments

Comments
 (0)