Skip to content

Commit

Permalink
use sbt-release to manage release versions and commits (#139)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mengxr authored Jun 18, 2018
1 parent ce5c970 commit ae89d6d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
14 changes: 13 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Your sbt build file. Guides on how to write one can be found at
// http://www.scala-sbt.org/0.13/docs/index.html

import ReleaseTransformations._

val sparkVer = sys.props.getOrElse("spark.version", "2.3.0")
val sparkBranch = sparkVer.substring(0, 3)
val defaultScalaVer = sparkBranch match {
Expand All @@ -20,7 +22,7 @@ scalaVersion := scalaVer
spName := "databricks/spark-deep-learning"

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

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

coverageHighlighting := false

// We only use sbt-release to update version numbers for now.
releaseProcess := Seq[ReleaseStep](
inquireVersions,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
setNextVersion,
commitNextVersion
)
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ resolvers += "Spark Packages repo" at "https://dl.bintray.com/spark-packages/mav
addSbtPlugin("org.spark-packages" %% "sbt-spark-package" % "0.2.5")
// scalacOptions in (Compile,doc) := Seq("-groups", "-implicits")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0")

addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.8")
1 change: 1 addition & 0 deletions version.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version in ThisBuild := "1.0.1-SNAPSHOT"

0 comments on commit ae89d6d

Please sign in to comment.