public class JGitFlow extends Object
This class only offers methods to construct so-called command classes. Each
command is represented by one command class.
Example: this class offers a featureStart method returning an instance of
the FeatureStartCommand class. The FeatureStartCommand class has setters
for all the arguments and options. The FeatureStartCommand class also has a
call method to actually execute the command.
All mandatory parameters for commands have to be specified in the methods of this class, the optional parameters have to be specified by the setter-methods of the Command class.
| Modifier and Type | Method and Description |
|---|---|
FeatureFinishCommand |
featureFinish(String name)
Returns a command object to finish a feature
|
FeaturePublishCommand |
featurePublish(String name)
Returns a command object to publish a feature
|
FeatureStartCommand |
featureStart(String name)
Returns a command object to start a feature
|
static JGitFlow |
forceInit(File projectDir)
Initializes a project for use with git flow using a default context overriding any existing configuration.
|
static JGitFlow |
forceInit(File projectDir,
InitContext context)
Initializes a project for use with git flow using a custom context overriding any existing configuration.
|
static JGitFlow |
forceInit(File projectDir,
InitContext context,
String defaultOriginUrl)
Initializes a project for use with git flow using a custom context overriding any existing configuration.
|
static JGitFlow |
forceInit(File projectDir,
String defaultOriginUrl)
Initializes a project for use with git flow using a default context overriding any existing configuration.
|
static JGitFlow |
get(File projectDir)
Gets an existing git flow project and returns a JGitFlow instance
|
String |
getDevelopBranchName()
Returns the develop branch name configured for this instance's git flow project
|
String |
getFeatureBranchPrefix()
Returns the feature branch prefix configured for this instance's git flow project
|
String |
getHotfixBranchPrefix()
Returns the hotfix branch prefix configured for this instance's git flow project
|
String |
getMasterBranchName()
Returns the master branch name configured for this instance's git flow project
|
static JGitFlow |
getOrInit(File projectDir)
Initializes a project for use with git flow or gets an existing project and returns a JGitFlow instance.
|
static JGitFlow |
getOrInit(File projectDir,
InitContext ctx)
Initializes a project for use with git flow using a custom context or gets an existing project and returns a JGitFlow instance.
|
static JGitFlow |
getOrInit(File projectDir,
InitContext ctx,
String defaultOriginUrl)
Initializes a project for use with git flow using a custom context or gets an existing project and returns a JGitFlow instance.
|
static JGitFlow |
getOrInit(File projectDir,
String defaultOriginUrl)
Initializes a project for use with git flow or gets an existing project and returns a JGitFlow instance.
|
String |
getReleaseBranchPrefix()
Returns the release branch prefix configured for this instance's git flow project
|
JGitFlowReporter |
getReporter() |
String |
getSupportBranchPrefix() |
String |
getVersionTagPrefix()
Returns the versiontag prefix configured for this instance's git flow project
|
org.eclipse.jgit.api.Git |
git()
Returns the
Git instance used by this JGitFlow instance |
HotfixFinishCommand |
hotfixFinish(String name)
Returns a command object to finish a hotfix
|
HotfixPublishCommand |
hotfixPublish(String name)
Returns a command object to publish a hotfix
|
HotfixStartCommand |
hotfixStart(String name)
Returns a command object to start a hotfix
|
static JGitFlow |
init(File projectDir)
Initializes a project for use with git flow and returns a JGitFlow instance.
|
static JGitFlow |
init(File projectDir,
InitContext context)
Initializes a project for use with git flow using a custom context and returns a JGitFlow instance.
|
static JGitFlow |
init(File projectDir,
InitContext context,
String defaultOriginUrl)
Initializes a project for use with git flow using a custom context and returns a JGitFlow instance.
|
static JGitFlow |
init(File projectDir,
String defaultOriginUrl)
Initializes a project for use with git flow and returns a JGitFlow instance.
|
boolean |
isInitialized()
Tests whether the current project is git flow enabled
|
static boolean |
isInitialized(File dir)
Tests whether a project folder is git flow enabled
|
ReleaseFinishCommand |
releaseFinish(String name)
Returns a command object to finish a release
|
ReleasePublishCommand |
releasePublish(String name)
Returns a command object to publish a release
|
ReleaseStartCommand |
releaseStart(String name)
Returns a command object to start a release
|
public static JGitFlow init(File projectDir) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
This method will throw exceptions if the project has already been initialized
projectDir - JGitFlowIOExceptionAlreadyInitializedExceptionSameBranchExceptionJGitFlowGitAPIExceptionpublic static JGitFlow init(File projectDir, String defaultOriginUrl) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
This method will throw exceptions if the project has already been initialized
projectDir - JGitFlowIOExceptionAlreadyInitializedExceptionSameBranchExceptionJGitFlowGitAPIExceptionpublic static JGitFlow init(File projectDir, InitContext context) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
This method will throw exceptions if the project has already been initialized
projectDir - context - JGitFlowIOExceptionAlreadyInitializedExceptionSameBranchExceptionJGitFlowGitAPIExceptionpublic static JGitFlow init(File projectDir, InitContext context, String defaultOriginUrl) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
This method will throw exceptions if the project has already been initialized
projectDir - context - JGitFlowIOExceptionAlreadyInitializedExceptionSameBranchExceptionJGitFlowGitAPIExceptionpublic static JGitFlow forceInit(File projectDir) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir - JGitFlowIOExceptionAlreadyInitializedExceptionSameBranchExceptionJGitFlowGitAPIExceptionpublic static JGitFlow forceInit(File projectDir, String defaultOriginUrl) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir - JGitFlowIOExceptionAlreadyInitializedExceptionSameBranchExceptionJGitFlowGitAPIExceptionpublic static JGitFlow forceInit(File projectDir, InitContext context) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir - context - JGitFlowIOExceptionAlreadyInitializedExceptionSameBranchExceptionJGitFlowGitAPIExceptionpublic static JGitFlow forceInit(File projectDir, InitContext context, String defaultOriginUrl) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir - context - JGitFlowIOExceptionAlreadyInitializedExceptionSameBranchExceptionJGitFlowGitAPIExceptionpublic static JGitFlow get(File projectDir) throws JGitFlowIOException
projectDir - JGitFlowIOExceptionpublic static JGitFlow getOrInit(File projectDir) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir - JGitFlowIOExceptionAlreadyInitializedExceptionSameBranchExceptionJGitFlowGitAPIExceptionpublic static JGitFlow getOrInit(File projectDir, String defaultOriginUrl) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir - JGitFlowIOExceptionAlreadyInitializedExceptionSameBranchExceptionJGitFlowGitAPIExceptionpublic static JGitFlow getOrInit(File projectDir, InitContext ctx) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir - ctx - JGitFlowIOExceptionAlreadyInitializedExceptionSameBranchExceptionJGitFlowGitAPIExceptionpublic static JGitFlow getOrInit(File projectDir, InitContext ctx, String defaultOriginUrl) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir - ctx - JGitFlowIOExceptionAlreadyInitializedExceptionSameBranchExceptionJGitFlowGitAPIExceptionpublic static boolean isInitialized(File dir)
dir - public boolean isInitialized()
public FeatureStartCommand featureStart(String name)
name - FeatureStartCommandpublic FeatureFinishCommand featureFinish(String name)
name - FeatureFinishCommandpublic FeaturePublishCommand featurePublish(String name)
name - FeaturePublishCommandpublic ReleaseStartCommand releaseStart(String name)
name - ReleaseStartCommandpublic ReleaseFinishCommand releaseFinish(String name)
name - ReleaseFinishCommandpublic ReleasePublishCommand releasePublish(String name)
name - ReleasePublishCommandpublic HotfixStartCommand hotfixStart(String name)
name - HotfixStartCommandpublic HotfixFinishCommand hotfixFinish(String name)
name - HotfixFinishCommandpublic HotfixPublishCommand hotfixPublish(String name)
name - HotfixPublishCommandpublic org.eclipse.jgit.api.Git git()
Git instance used by this JGitFlow instancepublic String getMasterBranchName()
public String getDevelopBranchName()
public String getFeatureBranchPrefix()
public String getReleaseBranchPrefix()
public String getHotfixBranchPrefix()
public String getSupportBranchPrefix()
public String getVersionTagPrefix()
public JGitFlowReporter getReporter()
Copyright © 2013 Atlassian. All Rights Reserved.