public class ReleaseFinishCommand extends AbstractBranchMergingCommand<ReleaseFinishCommand,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, requirementHelper
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 |
---|---|
ReleaseMergeResult |
call() |
protected String |
getCommandName() |
ReleaseFinishCommand |
setExtension(ReleaseFinishExtension extension) |
ReleaseFinishCommand |
setNoMerge(boolean noMerge)
Set whether to turn off merging
|
ReleaseFinishCommand |
setNoTag(boolean noTag)
Set whether to turn off tagging
|
ReleaseFinishCommand |
setSquash(boolean squash)
Set whether to squash all commits into a single commit before the merge
|
checkMergeResults, checkoutTopicBranch, cleanupBranchesIfNeeded, createEmptyMergeResult, doMerge, doMerge, doMerge, doTag, getMessage, isAddScmCommentSuffixOnMerge, isForceDeleteBranch, isKeepBranch, setAddScmCommentSuffixOnMerge, setForceDeleteBranch, setKeepBranch, setMessage
doFetchIfNeeded, doPushIfNeeded, enforcer, ensureLocalBranchesNotBehindRemotes, getBranchName, getScmMessagePrefix, getScmMessageSuffix, isAllowUntracked, isFetch, isPush, runBeforeAndGetPrefixedBranchName, runExtensionCommands, setAllowUntracked, setFetch, setPush, setScmMessagePrefix, setScmMessageSuffix
public 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 ReleaseMergeResult call() throws JGitFlowGitAPIException, LocalBranchMissingException, DirtyWorkingTreeException, JGitFlowIOException, BranchOutOfDateException, JGitFlowExtensionException, NotInitializedException
public ReleaseFinishCommand setNoTag(boolean noTag)
noTag
- true
to turn off tagging, false
(default) otherwisethis
public ReleaseFinishCommand setSquash(boolean squash)
squash
- true
to squash, false
(default) otherwisethis
public ReleaseFinishCommand setNoMerge(boolean noMerge)
noMerge
- true
to turn off merging, false
(default) otherwisethis
public ReleaseFinishCommand setExtension(ReleaseFinishExtension extension)
protected String getCommandName()
getCommandName
in class AbstractGitFlowCommand<ReleaseFinishCommand,ReleaseMergeResult>
Copyright © 2017 Atlassian. All rights reserved.