Skip to content

Commit 556bdf7

Browse files
committed
Use sbt-sonatype for batch upload to Sonatype.
1 parent 7179aee commit 556bdf7

File tree

5 files changed

+17
-48
lines changed

5 files changed

+17
-48
lines changed

README.md

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -157,43 +157,4 @@ Before publishing any patch release, binary compatibility with previous version
157157

158158
To publish scalactic, scalatest and scalatest-app use the following command:
159159

160-
$ sbt scalatestCompatible/clean scalatestCompatible/publishSigned
161-
$ export SCALAJS_VERSION=0.6.28
162-
$ sbt ++2.10.7 clean publishSigned "project scalatestAppJS" clean publishSigned
163-
$ sbt ++2.11.12 clean publishSigned "project scalatestAppJS" clean publishSigned
164-
$ sbt ++2.12.9 "project scalatestApp" clean publishSigned "project scalatestAppJS" clean publishSigned
165-
$ sbt ++2.13.0 "project scalatestApp" clean publishSigned "project scalatestAppJS" clean publishSigned
166-
$ sbt ++2.11.12 "project scalatestAppNative" clean publishSigned
167-
$ export SCALAJS_VERSION=1.0.0-M3
168-
$ sbt ++2.11.12 "project scalatestAppJS" clean publishSigned
169-
$ sbt ++2.12.6 "project scalatestAppJS" clean publishSigned
170-
$ export SCALAJS_VERSION=1.0.0-M8
171-
$ sbt ++2.13.0 "project scalatestAppJS" clean publishSigned
172-
$ sbt scalacticDotty/clean scalacticDotty/publishSigned
173-
$ sbt scalatestDotty/clean scalatestDotty/publishSigned
174-
175-
To publish scalatest modules for jvm, use the following commands:
176-
177-
$ sbt scalatestModules/clean
178-
$ sbt +scalatestModules/publishSigned
179-
180-
To publish scalatest modules for js, use the following commands:
181-
182-
$ export SCALAJS_VERSION=0.6.28
183-
$ sbt scalatestModulesJS/clean
184-
$ sbt +scalatestModulesJS/publishSigned
185-
$ export SCALAJS_VERSION=1.0.0-M3
186-
$ sbt ++2.11.12 "project scalatestModulesJS" clean publishSigned
187-
$ sbt ++2.12.6 "project scalatestModulesJS" clean publishSigned
188-
$ export SCALAJS_VERSION=1.0.0-M8
189-
$ sbt ++2.13.0 "project scalatestModulesJS" clean publishSigned
190-
191-
To publish scalatest modules for native, use the following commands:
192-
193-
$ sbt ++2.11.12 scalatestModulesNative/clean
194-
$ sbt ++2.11.12 scalatestModulesNative/publishSigned
195-
196-
To publish scalatest modules for Dotty, use the following commands:
197-
198-
$ sbt scalatestModulesDotty/clean
199-
$ sbt scalatestModulesDotty/publishSigned
160+
$ ./publish.sh

project/BuildCommons.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ trait BuildCommons {
77

88
lazy val supportedScalaVersions = List("2.13.0", "2.12.9", "2.11.12", "2.10.7")
99

10-
val releaseVersion = "3.1.0-RC2"
10+
val releaseVersion = "3.1.0-RC4"
1111

1212
val previousReleaseVersion = "3.0.8"
1313

project/plugins.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8")
2+
13
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")
24

35
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.4")

project/scalatest.scala

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import com.typesafe.tools.mima.core.ProblemFilters._
1919

2020
import dotty.tools.sbtplugin.DottyPlugin.autoImport._
2121

22+
import xerial.sbt.Sonatype.autoImport.sonatypePublishToBundle
23+
2224
object ScalatestBuild extends BuildCommons with DottyBuild with NativeBuild with JsBuild {
2325

2426
// To run gentests
@@ -93,13 +95,7 @@ object ScalatestBuild extends BuildCommons with DottyBuild with NativeBuild with
9395
javaHome := getJavaHome(scalaBinaryVersion.value),
9496
version := releaseVersion,
9597
resolvers += "Sonatype Public" at "https://oss.sonatype.org/content/groups/public",
96-
publishTo := {
97-
val nexus = "https://oss.sonatype.org/"
98-
if (version.value.trim.endsWith("SNAPSHOT"))
99-
Some("publish-snapshots" at nexus + "content/repositories/snapshots")
100-
else
101-
Some("publish-releases" at nexus + "service/local/staging/deploy/maven2")
102-
},
98+
publishTo := sonatypePublishToBundle.value,
10399
publishMavenStyle := true,
104100
publishArtifact in Test := false,
105101
pomIncludeRepository := { _ => false },

publish.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
sbt scalatestCompatible/clean scalatestCompatible/publishSigned
2+
export SCALAJS_VERSION=0.6.29
3+
sbt "project scalatestApp" clean +publishSigned
4+
sbt "project scalatestAppJS" clean +publishSigned
5+
export SCALAJS_VERSION=1.0.0-M8
6+
sbt "project scalatestAppJS" clean +publishSigned
7+
sbt ++2.11.12 "project scalatestAppNative" clean publishSigned
8+
sbt scalacticDotty/clean scalacticDotty/publishSigned
9+
sbt scalatestDotty/clean scalatestDotty/publishSigned
10+
sbt sonatypeBundleUpload

0 commit comments

Comments
 (0)