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