Skip to content

Commit

Permalink
Merge pull request #59 from timgent/use-release-plugin
Browse files Browse the repository at this point in the history
Add in ability to use release command for auto-version, tag, and release
  • Loading branch information
timgent committed Jul 8, 2020
2 parents ad090b5 + 59600a5 commit 3149a57
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
22 changes: 21 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Dependencies._
import xerial.sbt.Sonatype.GitHubHosting

val libraryVersion = "0.1.7"
val libraryVersion = "0.1.8-SNAPSHOT"

ThisBuild / scalaVersion := "2.11.12"
ThisBuild / version := libraryVersion
Expand Down Expand Up @@ -69,3 +69,23 @@ publishTo := sonatypePublishToBundle.value
sonatypeProfileName := "com.github.timgent"
publishMavenStyle := true
sonatypeProjectHosting := Some(GitHubHosting("timgent", "spark-data-quality", "tim.gent@gmail.com"))

import ReleaseTransformations._

releaseCrossBuild := false // true if you cross-build the project for multiple Scala versions
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
// For non cross-build projects, use releaseStepCommand("publishSigned")
// For cross-build projects, use releaseStepCommand("+publishSigned")
releaseStepCommandAndRemaining("publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
)
3 changes: 1 addition & 2 deletions docs-source/developer-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ https://github.com/xerial/sbt-sonatype

To publish a new version do the following in an sbt shell:
```
publishSigned
sonatypeBundleRelease
release
```

## Documentation creation and publishing
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0-M2")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.3")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13")

0 comments on commit 3149a57

Please sign in to comment.