Skip to content

Commit 6d9c4f8

Browse files
committed
Merged hotfix/1.2.3
2 parents 33990a8 + c48c3c8 commit 6d9c4f8

File tree

5 files changed

+8
-16
lines changed

5 files changed

+8
-16
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ One common stumbling block for teams adjusting to gitflow with Maven projects is
7878
In practice, the Maven versions should:
7979

8080
* Be synchronized with release branch and hotfix branch names.
81-
* Never be -SNAPSHOT in the master branch, release, hotfix, or bugfix branches.
82-
* Always be -SNAPSHOT in the development or feature branches.
81+
* Never be -SNAPSHOT in the master branch, release, or hotfix branches.
82+
* Always be -SNAPSHOT in the development branch.
8383
* Be irrelevant if there's no git branch resolvable from your environment.
8484

8585
The `enforce-versions` goal asserts these semantics when it can resolve the `gitBranchExpression`.
@@ -96,7 +96,6 @@ The following properties change the behavior of this goal:
9696
| masterBranchPattern | origin/master | No | Regex. When matched, signals the master branch is being built. Note the lack of a subgroup. |
9797
| releaseBranchPattern | origin/release/(.*) | No | Regex. When matched, signals a release branch being built. Subgroup 1, if present, must match the Maven project version. |
9898
| hotfixBranchPattern | origin/hotfix/(.*) | No | Regex. When matched, signals a hotfix branch is being built. Subgroup 1, if present, must match the Maven project version. |
99-
| bugfixBranchPattern | origin/bugfix/.* | No | Regex. When matched, signals a bugfix branch is being built. Note the lack of a subgroup. |
10099
| developmentBranchPattern | origin/development | Yes | Regex. When matched, signals a development branch is being built. Note the lack of a subgroup. |
101100

102101
## Goal: `retarget-deploy` (Branch Specific Deploy Targets & Staging)
@@ -240,7 +239,6 @@ The following table describes the git branch expression -> repository used for r
240239
| masterBranchPattern | release |
241240
| releaseBranchPattern | stage |
242241
| hotfixBranchPattern | stage |
243-
| bugfixBranchPattern | stage |
244242
| developmentBranchPattern | snapshots |
245243
| All Others | local |
246244

src/main/java/com/e_gineering/maven/gitflowhelper/AbstractGitflowBranchMojo.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ public abstract class AbstractGitflowBranchMojo extends AbstractMojo {
3535
@Parameter(defaultValue = "origin/hotfix/(.*)", property = "hotfixBranchPattern", required = true)
3636
private String hotfixBranchPattern;
3737

38-
@Parameter(defaultValue = "origin/bugfix/.*", property = "bugfixBranchPattern", required = true)
39-
private String bugfixBranchPattern;
40-
4138
@Parameter(defaultValue = "origin/development", property = "developmentBranchPattern", required = true)
4239
private String developmentBranchPattern;
4340

@@ -94,8 +91,6 @@ public void execute() throws MojoExecutionException, MojoFailureException {
9491
logExecute(GitBranchType.RELEASE, gitBranch, releaseBranchPattern);
9592
} else if (gitBranch.matches(hotfixBranchPattern)) {
9693
logExecute(GitBranchType.HOTFIX, gitBranch, hotfixBranchPattern);
97-
} else if (gitBranch.matches(bugfixBranchPattern)) {
98-
logExecute(GitBranchType.BUGFIX, gitBranch, bugfixBranchPattern);
9994
} else if (gitBranch.matches(developmentBranchPattern)) {
10095
logExecute(GitBranchType.DEVELOPMENT, gitBranch, developmentBranchPattern);
10196
} else {

src/main/java/com/e_gineering/maven/gitflowhelper/AttachDeployedArtifactsMojo.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ protected void execute(GitBranchType type, String gitBranch, String branchPatter
2222
break;
2323
}
2424
case RELEASE:
25-
case HOTFIX:
26-
case BUGFIX: {
25+
case HOTFIX: {
2726
getLog().info("Attaching artifacts from stage repository...");
2827
attachExistingArtifacts(stageDeploymentRepository, true);
2928
break;

src/main/java/com/e_gineering/maven/gitflowhelper/EnforceVersionsMojo.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import org.apache.maven.plugins.annotations.LifecyclePhase;
77
import org.apache.maven.plugins.annotations.Mojo;
88

9-
import java.util.EnumSet;
109
import java.util.regex.Matcher;
1110
import java.util.regex.Pattern;
1211

@@ -17,11 +16,9 @@
1716
@Mojo(name = "enforce-versions", defaultPhase = LifecyclePhase.VALIDATE)
1817
public class EnforceVersionsMojo extends AbstractGitflowBranchMojo {
1918

20-
private static EnumSet<GitBranchType> versionedTypes = EnumSet.of(GitBranchType.MASTER, GitBranchType.RELEASE, GitBranchType.HOTFIX, GitBranchType.BUGFIX);
21-
2219
@Override
2320
protected void execute(final GitBranchType type, final String gitBranch, final String branchPattern) throws MojoExecutionException, MojoFailureException {
24-
if (versionedTypes.contains(type)) {
21+
if (GitBranchType.VERSIONED_TYPES.contains(type)) {
2522
getLog().debug("Versioned Branch Type: " + type + " with branchPattern: " + branchPattern + " Checking against current branch: " + gitBranch);
2623
Matcher gitMatcher = Pattern.compile(branchPattern).matcher(gitBranch);
2724

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
package com.e_gineering.maven.gitflowhelper;
22

3+
import java.util.EnumSet;
4+
35
/**
46
* Enum for different types of Git Branches...
57
*/
68
public enum GitBranchType {
79
MASTER,
810
RELEASE,
911
HOTFIX,
10-
BUGFIX,
1112
DEVELOPMENT,
1213
OTHER,
1314
UNDEFINED;
15+
16+
static final EnumSet<GitBranchType> VERSIONED_TYPES = EnumSet.of(GitBranchType.MASTER, GitBranchType.RELEASE, GitBranchType.HOTFIX);
1417
}

0 commit comments

Comments
 (0)