public class HotfixFinishCommand extends AbstractBranchMergingCommand<HotfixFinishCommand,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, requirementHelper| Constructor and Description |
|---|
HotfixFinishCommand(String hotfixName,
org.eclipse.jgit.api.Git git,
GitFlowConfiguration gfConfig)
Create a new hotfix finish command instance.
|
| Modifier and Type | Method and Description |
|---|---|
ReleaseMergeResult |
call() |
protected String |
getCommandName() |
HotfixFinishCommand |
setExtension(HotfixFinishExtension extension) |
HotfixFinishCommand |
setMessage(String message)
Set the commit message for the tag creation
|
HotfixFinishCommand |
setNoTag(boolean noTag)
Set whether to turn off tagging
|
checkMergeResults, checkoutTopicBranch, cleanupBranchesIfNeeded, createEmptyMergeResult, doMerge, doMerge, doMerge, doTag, getMessage, isForceDeleteBranch, isKeepBranch, setForceDeleteBranch, setKeepBranchdoFetchIfNeeded, doPushIfNeeded, enforcer, ensureLocalBranchesNotBehindRemotes, getBranchName, getScmMessagePrefix, getScmMessageSuffix, isAllowUntracked, isFetch, isPush, runBeforeAndGetPrefixedBranchName, runExtensionCommands, setAllowUntracked, setFetch, setPush, setScmMessagePrefix, setScmMessageSuffixpublic HotfixFinishCommand(String hotfixName, org.eclipse.jgit.api.Git git, GitFlowConfiguration gfConfig)
JGitFlow.hotfixFinish(String)hotfixName - The name/version of the hotfixgit - The git instance to usegfConfig - The GitFlowConfiguration to usepublic ReleaseMergeResult call() throws JGitFlowGitAPIException, LocalBranchMissingException, DirtyWorkingTreeException, JGitFlowIOException, BranchOutOfDateException, JGitFlowExtensionException, NotInitializedException
public HotfixFinishCommand setMessage(String message)
setMessage in class AbstractBranchMergingCommand<HotfixFinishCommand,ReleaseMergeResult>message - thispublic HotfixFinishCommand setNoTag(boolean noTag)
noTag - true to turn off tagging, false(default) otherwisethispublic HotfixFinishCommand setExtension(HotfixFinishExtension extension)
protected String getCommandName()
getCommandName in class AbstractGitFlowCommand<HotfixFinishCommand,ReleaseMergeResult>Copyright © 2023 DV Bern AG. All rights reserved.