public void requireNoExistingReleaseBranches() throws ReleaseBranchExistsException, JGitFlowGitAPIException
{
List<Ref> branches = GitHelper.listBranchesWithPrefix(git, gfConfig.getPrefixValue(JGitFlowConstants.PREFIXES.RELEASE.configKey()));
if (!branches.isEmpty())
{
reporter.errorText(commandName, "a release branch [" + branches.get(0).getName() + "] already exists. Finish that first!");
reporter.flush();
throw new ReleaseBranchExistsException("a release branch [" + branches.get(0).getName() + "] already exists. Finish that first!");
}
}
<configuration>
<flowInitContext>
<masterBranchName>master</masterBranchName>
<developBranchName>development</developBranchName>
<featureBranchPrefix>feature-</featureBranchPrefix>
<releaseBranchPrefix>release-</releaseBranchPrefix>
<hotfixBranchPrefix>hotfix-</hotfixBranchPrefix>
<versionTagPrefix>release-</versionTagPrefix>
</flowInitContext>
<username>jenkins</username>
<password>admin1</password>
<noDeploy>true</noDeploy>
<useReleaseProfile>false</useReleaseProfile>
<pushReleases>false</pushReleases>
<keepBranch>false</keepBranch>
<scmCommentPrefix>[jgitflow]</scmCommentPrefix>
</configuration>