From 8b62042c4ab3dc2059f18aecd79e3de43cc11b6d Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Mon, 4 Nov 2019 16:58:41 +0100 Subject: [PATCH] Update to sbt 1.3.3 and use sbt-ci-release (#208) References #193, #203. The issue with publishLocal mentioned in #193 seems to have disappeared. This should also use sonatype bundle uploads for releasing, which might speed up the travis release enough so it completes within the deadline. Still needs to be tested, though, because that feature is only used when doing non-snapshot releases. We should probably release an RC first to test the process. --- .travis.yml | 2 +- build.sbt | 24 ------------------------ project/build.properties | 2 +- project/plugins.sbt | 3 +-- 4 files changed, 3 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3e35ae8..6cf0ad8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,7 +65,7 @@ jobs: # Increasing ReservedCodeCacheSize minimizes scala compiler-interface compile times script: sbt -J-XX:ReservedCodeCacheSize=256M ++$SCALA_VERSION test - stage: release - script: echo $PGP_SECRET | base64 --decode | gpg --import && sbt +publishSigned + script: sbt ci-release before_cache: - find $HOME/.sbt -name "*.lock" | xargs rm diff --git a/build.sbt b/build.sbt index 04e1de6..78567dc 100644 --- a/build.sbt +++ b/build.sbt @@ -65,30 +65,6 @@ lazy val defaults = Seq( }, scalaMajorVersion := CrossVersion.partialVersion(scalaVersion.value).get._2.toInt, resolvers += Resolver.mavenLocal, - publishTo := { - if (version.value endsWith "-SNAPSHOT") Some("snapshots" at "https://oss.sonatype.org/content/repositories/snapshots") - else Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2") - }, - // This should no longer be necessary once we update to sbt-ci-release - // https://github.com/lightbend/genjavadoc/issues/203 - credentials ++= { - val alreadyContainsSonatypeCredentials = credentials.value.collect { - case d: DirectCredentials => d.host == "oss.sonatype.org" - }.nonEmpty - if (!alreadyContainsSonatypeCredentials) { - val env = sys.env.get(_) - (for { - username <- env("SONATYPE_USERNAME") - password <- env("SONATYPE_PASSWORD") - } yield - Credentials( - "Sonatype Nexus Repository Manager", - "oss.sonatype.org", - username, - password - )).toSeq - } else Seq.empty - }, startYear := Some(2012), homepage := Some(url("https://github.com/lightbend/genjavadoc")), licenses := Seq("Apache-2.0" -> url("http://opensource.org/licenses/Apache-2.0")), diff --git a/project/build.properties b/project/build.properties index 133a8f1..6adcdc7 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.17 +sbt.version=1.3.3 diff --git a/project/plugins.sbt b/project/plugins.sbt index 88c8389..82d7377 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,2 +1 @@ -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0") -addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.0.0") +addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.4.31")