public class ReleaseFinishCommand extends AbstractGitFlowCommand<ReleaseMergeResult>
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, reporter| Constructor and Description |
|---|
ReleaseFinishCommand(String releaseName,
org.eclipse.jgit.api.Git git,
GitFlowConfiguration gfConfig,
JGitFlowReporter reporter)
Create a new release finish command instance.
|
| Modifier and Type | Method and Description |
|---|---|
ReleaseMergeResult |
call() |
protected String |
getCommandName() |
ReleaseFinishCommand |
setAllowUntracked(boolean allow) |
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 |
setNoMerge(boolean noMerge)
Set whether to turn off merging
|
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 |
setScmMessagePrefix(String scmMessagePrefix) |
ReleaseFinishCommand |
setSquash(boolean squash)
Set whether to squash all commits into a single commit before the merge
|
getScmMessagePrefix, isAllowUntracked, requireCleanWorkingTree, requireCommitOnBranch, requireGitFlowInitialized, requireLocalBranchAbsent, requireLocalBranchExists, requireLocalBranchNotBehindRemote, requireNoExistingHotfixBranches, requireNoExistingReleaseBranches, requireRemoteBranchAbsent, requireRemoteBranchExists, requireTagAbsentpublic ReleaseFinishCommand(String releaseName, org.eclipse.jgit.api.Git git, GitFlowConfiguration gfConfig, JGitFlowReporter reporter)
JGitFlow.releaseFinish(String)releaseName - The name/version of the releasegit - The git instance to usegfConfig - The GitFlowConfiguration to usereporter - public ReleaseFinishCommand setAllowUntracked(boolean allow)
setAllowUntracked in class AbstractGitFlowCommand<ReleaseMergeResult>public ReleaseFinishCommand setScmMessagePrefix(String scmMessagePrefix)
setScmMessagePrefix in class AbstractGitFlowCommand<ReleaseMergeResult>public ReleaseMergeResult 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) otherwisethispublic ReleaseFinishCommand setNoMerge(boolean noMerge)
noMerge - true to turn off merging, false(default) otherwisethisprotected String getCommandName()
getCommandName in class AbstractGitFlowCommand<ReleaseMergeResult>Copyright © 2013 Atlassian. All Rights Reserved.