sbt-release
sbt-release copied to clipboard
Global release switch, tag prefix
Let the user decide whether the release should be global or local by setting the globalRelease setting.
Let's say we have a project with the following modules:
- core
- lib-A
- lib-B
- client
- server
You might want to release core, lib-A and lib-B at once but client and server independently. Currently the release plugin set the version to the version.sbt file at the root of the project, in the ThisBuild scope. Therefore your only option is to create 3 independent SBT projects.
With these changes you can have a per-module release process.
For instance in server the release process could be defined this way:
Project("server").
settings(
ReleasePlugin.releaseSettings : _*).
settings(
globalRelease := false,
tagPrefix := "server-",
// server specific settings used by the bundle, upload and restartServer steps
bundleTarget <<= target(_ / "dist"),
bundleFile <<= (bundleTarget,name,version){(t,n,v) => t / (n + "-" + v + ".tar")},
serverUri := "[email protected]",
serverTarget := "~/server/versions/",
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
// publishArtifacts, // don't care
bundle,
upload,
restartServer,
setNextVersion,
commitNextVersion,
pushChanges
)).
Love this! Thanks!
Thanks @ebowman, any idea if this is being considered?
:+1: