/** * Requires that no release branches already exist * @throws ReleaseBranchExistsException * @throws JGitFlowGitAPIException */ protected void requireNoExistingReleaseBranches() throws ReleaseBranchExistsException, JGitFlowGitAPIException { List<Ref> branches = GitHelper.listBranchesWithPrefix(git, JGitFlowConstants.PREFIXES.RELEASE.configKey()); if (!branches.isEmpty()) { reporter.errorText(getCommandName(),"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!"); } }
throw new JGitFlowReleaseException("Error starting release: " + e.getMessage(), e);
/** * Requires that no release branches already exist * * @throws com.atlassian.jgitflow.core.exception.ReleaseBranchExistsException * @throws com.atlassian.jgitflow.core.exception.JGitFlowGitAPIException */ 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!"); } }
/** * Requires that no release branches already exist * * @throws com.atlassian.jgitflow.core.exception.ReleaseBranchExistsException * @throws com.atlassian.jgitflow.core.exception.JGitFlowGitAPIException */ 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!"); } }