sbt-release icon indicating copy to clipboard operation
sbt-release copied to clipboard

Global release switch, tag prefix

Open backuitist opened this issue 12 years ago • 3 comments

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
          )).

backuitist avatar May 16 '13 08:05 backuitist

Love this! Thanks!

ebowman avatar May 30 '13 11:05 ebowman

Thanks @ebowman, any idea if this is being considered?

backuitist avatar Oct 08 '13 08:10 backuitist

:+1:

laughedelic avatar Mar 06 '14 17:03 laughedelic