public class JGitFlow extends Object
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 JGitFlowInitCommand |
forceInitCommand(File projectDir,
InitContext context)
Initializes a project for use with git flow using a custom 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 |
getPrefixForBranch(String branchName) |
String |
getReleaseBranchPrefix()
Returns the release branch prefix configured for this instance's git flow project
|
String |
getSupportBranchPrefix() |
BranchType |
getTypeForBranch(String branchName) |
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
- JGitFlowIOException
AlreadyInitializedException
SameBranchException
JGitFlowGitAPIException
public 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
- JGitFlowIOException
AlreadyInitializedException
SameBranchException
JGitFlowGitAPIException
public 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
- JGitFlowIOException
AlreadyInitializedException
SameBranchException
JGitFlowGitAPIException
public 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
- JGitFlowIOException
AlreadyInitializedException
SameBranchException
JGitFlowGitAPIException
public static JGitFlow forceInit(File projectDir) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir
- JGitFlowIOException
AlreadyInitializedException
SameBranchException
JGitFlowGitAPIException
public static JGitFlow forceInit(File projectDir, String defaultOriginUrl) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir
- JGitFlowIOException
AlreadyInitializedException
SameBranchException
JGitFlowGitAPIException
public static JGitFlow forceInit(File projectDir, InitContext context) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir
- context
- JGitFlowIOException
AlreadyInitializedException
SameBranchException
JGitFlowGitAPIException
public static JGitFlow forceInit(File projectDir, InitContext context, String defaultOriginUrl) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir
- context
- JGitFlowIOException
AlreadyInitializedException
SameBranchException
JGitFlowGitAPIException
public static JGitFlowInitCommand forceInitCommand(File projectDir, InitContext context) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir
- context
- JGitFlowIOException
AlreadyInitializedException
SameBranchException
JGitFlowGitAPIException
public static JGitFlow get(File projectDir) throws JGitFlowIOException
projectDir
- JGitFlowIOException
public static JGitFlow getOrInit(File projectDir) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir
- JGitFlowIOException
AlreadyInitializedException
SameBranchException
JGitFlowGitAPIException
public static JGitFlow getOrInit(File projectDir, String defaultOriginUrl) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir
- JGitFlowIOException
AlreadyInitializedException
SameBranchException
JGitFlowGitAPIException
public static JGitFlow getOrInit(File projectDir, InitContext ctx) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir
- ctx
- JGitFlowIOException
AlreadyInitializedException
SameBranchException
JGitFlowGitAPIException
public static JGitFlow getOrInit(File projectDir, InitContext ctx, String defaultOriginUrl) throws JGitFlowIOException, AlreadyInitializedException, SameBranchException, JGitFlowGitAPIException
projectDir
- ctx
- JGitFlowIOException
AlreadyInitializedException
SameBranchException
JGitFlowGitAPIException
public static boolean isInitialized(File dir)
dir
- public boolean isInitialized()
public FeatureStartCommand featureStart(String name)
name
- FeatureStartCommand
public FeatureFinishCommand featureFinish(String name)
name
- FeatureFinishCommand
public FeaturePublishCommand featurePublish(String name)
name
- FeaturePublishCommand
public ReleaseStartCommand releaseStart(String name)
name
- ReleaseStartCommand
public ReleaseFinishCommand releaseFinish(String name)
name
- ReleaseFinishCommand
public ReleasePublishCommand releasePublish(String name)
name
- ReleasePublishCommand
public HotfixStartCommand hotfixStart(String name)
name
- HotfixStartCommand
public HotfixFinishCommand hotfixFinish(String name)
name
- HotfixFinishCommand
public HotfixPublishCommand hotfixPublish(String name)
name
- HotfixPublishCommand
public 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 BranchType getTypeForBranch(String branchName)
Copyright © 2017 Atlassian. All rights reserved.