Skip to content

Commit ae89d6d

Browse files
authored
use sbt-release to manage release versions and commits (#139)
This PR switches to sbt-release to manage release versions. Right now, it only helps set release version, commit, add release tag, and then bump release version, and commit again.
1 parent ce5c970 commit ae89d6d

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

build.sbt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Your sbt build file. Guides on how to write one can be found at
22
// http://www.scala-sbt.org/0.13/docs/index.html
33

4+
import ReleaseTransformations._
5+
46
val sparkVer = sys.props.getOrElse("spark.version", "2.3.0")
57
val sparkBranch = sparkVer.substring(0, 3)
68
val defaultScalaVer = sparkBranch match {
@@ -20,7 +22,7 @@ scalaVersion := scalaVer
2022
spName := "databricks/spark-deep-learning"
2123

2224
// Don't forget to set the version
23-
version := s"1.0.0-spark$sparkBranch"
25+
version := (version in ThisBuild).value + s"-spark$sparkBranch"
2426

2527
// All Spark Packages need a license
2628
licenses := Seq("Apache-2.0" -> url("http://opensource.org/licenses/Apache-2.0"))
@@ -83,3 +85,13 @@ concurrentRestrictions in Global := Seq(
8385
autoAPIMappings := true
8486

8587
coverageHighlighting := false
88+
89+
// We only use sbt-release to update version numbers for now.
90+
releaseProcess := Seq[ReleaseStep](
91+
inquireVersions,
92+
setReleaseVersion,
93+
commitReleaseVersion,
94+
tagRelease,
95+
setNextVersion,
96+
commitNextVersion
97+
)

project/plugins.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ resolvers += "Spark Packages repo" at "https://dl.bintray.com/spark-packages/mav
33
addSbtPlugin("org.spark-packages" %% "sbt-spark-package" % "0.2.5")
44
// scalacOptions in (Compile,doc) := Seq("-groups", "-implicits")
55
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0")
6+
7+
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.8")

version.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version in ThisBuild := "1.0.1-SNAPSHOT"

0 commit comments

Comments
 (0)