From 37bebd0911f465814e5bb3d67781b2ebbf21c342 Mon Sep 17 00:00:00 2001 From: Christian Schlichtherle Date: Thu, 15 Apr 2021 17:56:52 +0200 Subject: [PATCH] Fix release process. --- build.sbt | 55 ++++++++++++++++++++-------------------- project/build.properties | 2 +- project/plugins.sbt | 5 ++-- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/build.sbt b/build.sbt index be6587d..0b14628 100644 --- a/build.sbt +++ b/build.sbt @@ -14,8 +14,6 @@ * limitations under the License. */ -import ReleaseTransformations._ - inThisBuild(Seq( homepage := Some(url("https://github.com/christian-schlichtherle/bali-di-scala")), licenses := Seq("Apache License, Version 2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")), @@ -43,47 +41,26 @@ inThisBuild(Seq( }, publishArtifact := false, - publishTo := { - val nexus = "https://oss.sonatype.org/" - Some( - if (version(_ endsWith "-SNAPSHOT").value) { - "snapshots" at nexus + "content/repositories/snapshots" - } else { - "releases" at nexus + "service/local/staging/deploy/maven2" - } - ) - }, - releaseProcess := Seq[ReleaseStep]( - checkSnapshotDependencies, - inquireVersions, - runClean, - releaseStepCommandAndRemaining("+test"), - setReleaseVersion, - commitReleaseVersion, - tagRelease, - releaseStepCommandAndRemaining("+publishSigned"), - setNextVersion, - commitNextVersion, - pushChanges, - ), scalacOptions ++= Seq("-deprecation", "-feature", "-Ymacro-annotations"), scalaVersion := "2.13.5", scmInfo := Some(ScmInfo( browseUrl = url("https://github.com/christian-schlichtherle/bali-di-scala"), connection = "scm:git:git@github.com/christian-schlichtherle/bali-di-scala.git", - devConnection = Some("scm:git:git@github.com/christian-schlichtherle/bali-di-scala.git") )), + versionScheme := Some("early-semver"), // http://www.scalatest.org/user_guide/using_scalatest_with_sbt Test / logBuffered := false, Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-oD"), )) +ThisBuild / publishTo := sonatypePublishToBundle.value + lazy val root: Project = project .in(file(".")) .aggregate(scala, scalaSample) .settings( - name := "Bali DI Root", + name := "Bali DI Root for Scala " + scalaBinaryVersion.value, normalizedName := "bali-root", ) @@ -106,6 +83,28 @@ lazy val scalaSample: Project = project libraryDependencies ++= Seq( Dependency.ScalaTest % Test, ), - name := s"Bali DI for Scala ${scalaBinaryVersion.value} Samples", + name := "Bali DI Sample for Scala " + scalaBinaryVersion.value, normalizedName := "bali-scala-sample", ) + +import ReleaseTransformations._ + +releaseCrossBuild := false + +releaseProcess := Seq[ReleaseStep]( + checkSnapshotDependencies, + inquireVersions, + runClean, + runTest, + setReleaseVersion, + commitReleaseVersion, + tagRelease, +// releaseStepCommandAndRemaining("+publishSigned"), + releaseStepCommand("publishSigned"), + releaseStepCommand("sonatypeBundleRelease"), + setNextVersion, + commitNextVersion, + pushChanges, +) + +sonatypeProfileName := "global.namespace" diff --git a/project/build.properties b/project/build.properties index cb6a5a8..b366316 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 1.3.13 +sbt.version = 1.5.0 diff --git a/project/plugins.sbt b/project/plugins.sbt index 4013cd0..0640052 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -13,5 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -addSbtPlugin("com.github.sbt" % "sbt-release" % "1.0.15") -addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.10.0-RC1") +addDependencyTreePlugin +addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7")