-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split sbt release in stages? #220
Comments
What I ended up doing it is creating two custom commands and appending the releaseProcess setting to the state object which I then pass onto the release plugin. Not sure if there's a better way of doing the same thing: // Defines the release process
releaseIgnoreUntrackedFiles := true
commands += Command.command("prepareRelease")((state: State) => {
println("Preparing release...")
val extracted = Project extract state
var st = extracted.append(Seq(releaseProcess := Seq[ReleaseStep](
runClean,
checkSnapshotDependencies,
inquireVersions,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
runTest,
releaseStepTask(coverageReport),
releaseStepTask(dist)
)), state)
Command.process("release with-defaults", st)
})
commands += Command.command("completeRelease")((state: State) => {
println("Completing release...")
val extracted = Project extract state
val customState = extracted.append(Seq(releaseProcess := Seq[ReleaseStep](
inquireVersions,
setNextVersion,
commitNextVersion,
pushChanges
)), state)
val newState = Command.process("release with-defaults", customState)
newState
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have an SBT project and a CD pipeline and what I want is to execute the following sequence of events:
What I want to achieve really is to be able to first run sbt prepereRelease after which I will promote to my TEST environment and later, if everything goes ok, to run sbt doRelease.
Is there a way to achieve this atm?
The text was updated successfully, but these errors were encountered: