Skip to content

Commit 906407b

Browse files
committed
Merge pull request #23 from egineering-llc/hotfix/1.2.2
Don't fail the build when GIT_BRANCH is unset and it's a non-snapshot build.
2 parents de14395 + 8c65348 commit 906407b

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<groupId>com.e-gineering</groupId>
1010
<artifactId>gitflow-helper-maven-plugin</artifactId>
1111

12-
<version>1.2.1</version>
12+
<version>1.2.2</version>
1313
<packaging>maven-plugin</packaging>
1414

1515
<name>gitflow-helper-maven-plugin</name>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
102102
logExecute(GitBranchType.OTHER, gitBranch, null);
103103
}
104104
} else {
105-
logExecute(GitBranchType.OTHER, gitBranch, null);
105+
logExecute(GitBranchType.UNDEFINED, gitBranch, null);
106106
}
107107
}
108108
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected void execute(final GitBranchType type, final String gitBranch, final S
3838
}
3939
}
4040
}
41-
} else { // Unversioned branch type. Must be -SNAPSHOT.
41+
} else if (!type.equals(GitBranchType.UNDEFINED)) { // Unversioned branch type. Must be -SNAPSHOT.
4242
if (!ArtifactUtils.isSnapshot(project.getVersion())) {
4343
throw new MojoFailureException("Builds from non-release git branches must end with -SNAPSHOT");
4444
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ public enum GitBranchType {
99
HOTFIX,
1010
BUGFIX,
1111
DEVELOPMENT,
12-
OTHER;
12+
OTHER,
13+
UNDEFINED;
1314
}

0 commit comments

Comments
 (0)