Skip to content

Commit 8faab56

Browse files
authored
Use dynamic versioning with Git tags v0.x.y format (#555)
1 parent 84b3abd commit 8faab56

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

build.sbt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ Global / concurrentRestrictions := Seq(
77
Tags.limit(Tags.Test, 1)
88
)
99

10+
// Use dynamic snapshot version strings for non tagged versions
11+
ThisBuild / dynverSonatypeSnapshots := true
12+
// Use coursier friendly version separator
13+
ThisBuild / dynverSeparator := "-"
14+
1015
val buildSettings = Seq[Setting[_]](
1116
organization := "org.msgpack",
1217
organizationName := "MessagePack",
@@ -32,19 +37,12 @@ val buildSettings = Seq[Setting[_]](
3237
}
3338
},
3439
// Release settings
35-
releaseTagName := { (ThisBuild / version).value },
3640
releaseProcess := Seq[ReleaseStep](
3741
checkSnapshotDependencies,
3842
inquireVersions,
3943
runClean,
4044
runTest,
41-
setReleaseVersion,
42-
commitReleaseVersion,
4345
tagRelease,
44-
releaseStepCommand("publishSigned"),
45-
releaseStepCommand("sonatypeBundleRelease"),
46-
setNextVersion,
47-
commitNextVersion,
4846
pushChanges
4947
),
5048
// Add sonatype repository settings

project/plugins.sbt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.0.15")
2-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7")
3-
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
1+
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.0.15")
2+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7")
3+
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
44
// TODO: Fixes jacoco error:
55
// java.lang.NoClassDefFoundError: Could not initialize class org.jacoco.core.internal.flow.ClassProbesAdapter
66
//addSbtPlugin("com.github.sbt" % "sbt-jacoco" % "3.3.0")
77
addSbtPlugin("org.xerial.sbt" % "sbt-jcheckstyle" % "0.2.1")
88
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.5")
99
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
10+
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")
1011

1112
scalacOptions ++= Seq("-deprecation", "-feature")

version.sbt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)