Skip to content

Commit

Permalink
improve finding of hotfix support branches in hotfix-finish - closes #68
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandr-m committed Nov 15, 2017
1 parent c428b5b commit 3f310af
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,15 @@ && notSameProdDevName()) {
}
}

private String promptBranchName()
throws MojoFailureException, CommandLineException {
private String promptBranchName() throws MojoFailureException, CommandLineException {
// git for-each-ref --format='%(refname:short)' refs/heads/hotfix/*
final String hotfixBranches = gitFindBranches(
gitFlowConfig.getHotfixBranchPrefix(), false);
String hotfixBranches = gitFindBranches(gitFlowConfig.getHotfixBranchPrefix(), false);

// find hotfix support branches
if (!gitFlowConfig.getHotfixBranchPrefix().endsWith("/")) {
String supportHotfixBranches = gitFindBranches(gitFlowConfig.getHotfixBranchPrefix() + "*/*", false);
hotfixBranches = hotfixBranches + supportHotfixBranches;
}

if (StringUtils.isBlank(hotfixBranches)) {
throw new MojoFailureException("There are no hotfix branches.");
Expand Down

0 comments on commit 3f310af

Please sign in to comment.