public class ReleaseFinishCommand extends AbstractGitFlowCommand<Void>
This will merge the release into both master and develop and create a tag for the release
Examples (flow is a JGitFlow instance):
Finish a release:
flow.releaseFinish("1.0").call();
Don't delete the local release branch
flow.releaseFinish("1.0").setKeepBranch(true).call();
Squash all commits on the release branch into one before merging
flow.releaseFinish("1.0").setSquash(true).call();
Push changes to the remote origin
flow.releaseFinish("1.0").setPush(true).call();
Don't create a tag for the release
flow.releaseFinish("1.0").setNoTag(true).call();
gfConfig, git| Constructor and Description |
|---|
ReleaseFinishCommand(String releaseName,
org.eclipse.jgit.api.Git git,
GitFlowConfiguration gfConfig)
Create a new release finish command instance.
|
| Modifier and Type | Method and Description |
|---|---|
Void |
call() |
ReleaseFinishCommand |
setFetch(boolean fetch)
Set whether to perform a git fetch of the remote branches before doing the merge
|
ReleaseFinishCommand |
setKeepBranch(boolean keepBranch)
Set whether to keep the local release branch after the merge
|
ReleaseFinishCommand |
setMessage(String message)
Set the commit message for the tag creation
|
ReleaseFinishCommand |
setNoTag(boolean noTag)
Set whether to turn off tagging
|
ReleaseFinishCommand |
setPush(boolean push)
Set whether to push the changes to the remote repository
|
ReleaseFinishCommand |
setSquash(boolean squash)
Set whether to squash all commits into a single commit before the merge
|
requireCleanWorkingTree, requireGitFlowInitialized, requireLocalBranchAbsent, requireLocalBranchExists, requireLocalBranchNotBehindRemote, requireNoExistingHotfixBranches, requireNoExistingReleaseBranches, requireRemoteBranchAbsent, requireRemoteBranchExists, requireTagAbsentpublic ReleaseFinishCommand(String releaseName, org.eclipse.jgit.api.Git git, GitFlowConfiguration gfConfig)
JGitFlow.releaseFinish(String)releaseName - The name/version of the releasegit - The git instance to usegfConfig - The GitFlowConfiguration to usepublic Void call() throws JGitFlowGitAPIException, LocalBranchMissingException, DirtyWorkingTreeException, JGitFlowIOException, BranchOutOfDateException
public ReleaseFinishCommand setFetch(boolean fetch)
fetch - true to do the fetch, false(default) otherwisethispublic ReleaseFinishCommand setMessage(String message)
message - thispublic ReleaseFinishCommand setPush(boolean push)
push - true to do the push, false(default) otherwisethispublic ReleaseFinishCommand setKeepBranch(boolean keepBranch)
keepBranch - true to keep the branch, false(default) otherwisethispublic ReleaseFinishCommand setNoTag(boolean noTag)
noTag - true to turn off tagging, false(default) otherwisethispublic ReleaseFinishCommand setSquash(boolean squash)
squash - true to squash, false(default) otherwisethisCopyright © 2013 Atlassian. All Rights Reserved.