Skip to content

Conversation

@backuitist
Copy link

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

@ebowman
Copy link
Contributor

ebowman commented May 30, 2013

Love this! Thanks!

@backuitist
Copy link
Author

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

@laughedelic
Copy link
Member

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants