Skip to content

Commit 8b62042

Browse files
raboofSethTisue
authored andcommitted
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.
1 parent 969fb48 commit 8b62042

File tree

4 files changed

+3
-28
lines changed

4 files changed

+3
-28
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
# Increasing ReservedCodeCacheSize minimizes scala compiler-interface compile times
6666
script: sbt -J-XX:ReservedCodeCacheSize=256M ++$SCALA_VERSION test
6767
- stage: release
68-
script: echo $PGP_SECRET | base64 --decode | gpg --import && sbt +publishSigned
68+
script: sbt ci-release
6969

7070
before_cache:
7171
- find $HOME/.sbt -name "*.lock" | xargs rm

build.sbt

-24
Original file line numberDiff line numberDiff line change
@@ -65,30 +65,6 @@ lazy val defaults = Seq(
6565
},
6666
scalaMajorVersion := CrossVersion.partialVersion(scalaVersion.value).get._2.toInt,
6767
resolvers += Resolver.mavenLocal,
68-
publishTo := {
69-
if (version.value endsWith "-SNAPSHOT") Some("snapshots" at "https://oss.sonatype.org/content/repositories/snapshots")
70-
else Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2")
71-
},
72-
// This should no longer be necessary once we update to sbt-ci-release
73-
// https://github.com/lightbend/genjavadoc/issues/203
74-
credentials ++= {
75-
val alreadyContainsSonatypeCredentials = credentials.value.collect {
76-
case d: DirectCredentials => d.host == "oss.sonatype.org"
77-
}.nonEmpty
78-
if (!alreadyContainsSonatypeCredentials) {
79-
val env = sys.env.get(_)
80-
(for {
81-
username <- env("SONATYPE_USERNAME")
82-
password <- env("SONATYPE_PASSWORD")
83-
} yield
84-
Credentials(
85-
"Sonatype Nexus Repository Manager",
86-
"oss.sonatype.org",
87-
username,
88-
password
89-
)).toSeq
90-
} else Seq.empty
91-
},
9268
startYear := Some(2012),
9369
homepage := Some(url("https://github.com/lightbend/genjavadoc")),
9470
licenses := Seq("Apache-2.0" -> url("http://opensource.org/licenses/Apache-2.0")),

project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.13.17
1+
sbt.version=1.3.3

project/plugins.sbt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0")
2-
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.0.0")
1+
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.4.31")

0 commit comments

Comments
 (0)