Skip to content

Upgrade sbt-sonatype, sbt-pgp #7193

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

Merged
merged 2 commits into from
Sep 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ steps:

- name: test
pull: default
image: lampepfl/dotty:2019-08-22
image: lampepfl/dotty:2019-09-10
depends_on: [ clone ]
commands:
- cp -R . /tmp/1/ && cd /tmp/1/
Expand All @@ -36,7 +36,7 @@ steps:

- name: test_bootstrapped
pull: default
image: lampepfl/dotty:2019-08-22
image: lampepfl/dotty:2019-09-10
depends_on: [ clone ]
commands:
- cp -R . /tmp/2/ && cd /tmp/2/
Expand All @@ -45,7 +45,7 @@ steps:

- name: community_build
pull: default
image: lampepfl/dotty:2019-08-22
image: lampepfl/dotty:2019-09-10
depends_on: [ clone ]
commands:
- cp -R . /tmp/3/ && cd /tmp/3/
Expand All @@ -54,7 +54,7 @@ steps:

- name: test_sbt
pull: default
image: lampepfl/dotty:2019-08-22
image: lampepfl/dotty:2019-09-10
depends_on: [ clone ]
commands:
- cp -R . /tmp/4/ && cd /tmp/4/
Expand All @@ -66,7 +66,7 @@ steps:

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

- name: documentation
pull: default
image: lampepfl/dotty:2019-08-22
image: lampepfl/dotty:2019-09-10
depends_on:
- test
- test_bootstrapped
Expand All @@ -99,15 +99,15 @@ steps:

- name: publish_nightly
pull: default
image: lampepfl/dotty:2019-08-22
image: lampepfl/dotty:2019-09-10
depends_on:
- test
- test_bootstrapped
- community_build
- test_sbt
- test_java11
commands:
- ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease"
- ./project/scripts/sbtPublish ";project dotty-bootstrapped ;publishSigned ;sonatypeBundleRelease"
environment:
NIGHTLYBUILD: yes
PGP_PW:
Expand All @@ -126,7 +126,7 @@ steps:

- name: publish_release
pull: default
image: lampepfl/dotty:2019-08-22
image: lampepfl/dotty:2019-09-10
depends_on:
- test
- test_bootstrapped
Expand All @@ -135,7 +135,7 @@ steps:
- test_java11
commands:
- ./project/scripts/sbt dist-bootstrapped/packArchive
- ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease"
- ./project/scripts/sbtPublish ";project dotty-bootstrapped ;publishSigned ;sonatypeBundleRelease"
environment:
PGP_PW:
from_secret: pgp_pw
Expand Down Expand Up @@ -169,15 +169,15 @@ steps:

- name: publish_sbt_release
pull: default
image: lampepfl/dotty:2019-08-22
image: lampepfl/dotty:2019-09-10
depends_on:
- test
- test_bootstrapped
- community_build
- test_sbt
- test_java11
commands:
- ./project/scripts/sbtPublish ";sbt-dotty/publishSigned ;sonatypeRelease"
- ./project/scripts/sbtPublish ";project sbt-dotty ;publishSigned ;sonatypeBundleRelease"
environment:
PGP_PW:
from_secret: pgp_pw
Expand Down
11 changes: 4 additions & 7 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import sbt.plugins.SbtPlugin
import sbt.ScriptedPlugin.autoImport._
import xerial.sbt.pack.PackPlugin
import xerial.sbt.pack.PackPlugin.autoImport._
import xerial.sbt.Sonatype.autoImport._

import dotty.tools.sbtplugin.DottyPlugin.autoImport._
import dotty.tools.sbtplugin.DottyPlugin.makeScalaInstance
Expand Down Expand Up @@ -198,7 +199,8 @@ object Build {
password <- sys.env.get("SONATYPE_PW")
} yield Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", username, password)
).toList,
PgpKeys.pgpPassphrase := sys.env.get("PGP_PW").map(_.toCharArray())
PgpKeys.pgpPassphrase := sys.env.get("PGP_PW").map(_.toCharArray()),
PgpKeys.useGpgPinentry := true,
)

lazy val commonSettings = publishSettings ++ Seq(
Expand Down Expand Up @@ -1150,12 +1152,7 @@ object Build {
lazy val publishSettings = Seq(
publishMavenStyle := true,
isSnapshot := version.value.contains("SNAPSHOT"),
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
),
publishTo := sonatypePublishToBundle.value,
publishArtifact in Test := false,
homepage := Some(url(dottyGithubUrl)),
licenses += ("BSD New",
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

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

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

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

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

Expand Down
6 changes: 3 additions & 3 deletions project/scripts/sbtPublish
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ if [ ! "$NIGHTLYBUILD" = "yes" ] && [ ! "$RELEASEBUILD" = "yes" ]; then
exit 1
fi

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

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