Skip to content

Commit

Permalink
Fix release process.
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-schlichtherle committed Apr 15, 2021
1 parent 55a7a77 commit 37bebd0
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
55 changes: 27 additions & 28 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand Down Expand Up @@ -43,47 +41,26 @@ inThisBuild(Seq(
</issueManagement>
},
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",
)

Expand All @@ -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"
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.3.13
sbt.version = 1.5.0
5 changes: 3 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 37bebd0

Please sign in to comment.