Skip to content

Commit e070f8a

Browse files
committed
Not only the 'master' prefix but also the 'main' prefix is now stripped when deriving the version identifier
1 parent 896925d commit e070f8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-based-versioning/src/main/groovy/de/itemis/mps/gradle/GitBasedVersioning.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class GitBasedVersioning {
8686
static String getVersion(String branch, String major, String minor, String bugfix = "", int count) {
8787
def hash = getGitShortCommitHash()
8888
def baseVersion = bugfix.isEmpty() ? "$major.$minor.$count.$hash" : "$major.$minor.$bugfix.$count.$hash"
89-
if (branch == 'master' || branch == 'HEAD' /*this happens in detached head situations*/) {
89+
if (branch == 'master' || branch == 'main' || branch == 'HEAD' /*this happens in detached head situations*/) {
9090
return baseVersion
9191
}
9292

0 commit comments

Comments
 (0)