From e070f8a7f3ee23584c6770252f3ce8b01611a2bb Mon Sep 17 00:00:00 2001 From: Alexander Pann Date: Tue, 10 Sep 2024 09:33:35 +0200 Subject: [PATCH] Not only the 'master' prefix but also the 'main' prefix is now stripped when deriving the version identifier --- .../main/groovy/de/itemis/mps/gradle/GitBasedVersioning.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-based-versioning/src/main/groovy/de/itemis/mps/gradle/GitBasedVersioning.groovy b/git-based-versioning/src/main/groovy/de/itemis/mps/gradle/GitBasedVersioning.groovy index 7555e5e..c00c45c 100644 --- a/git-based-versioning/src/main/groovy/de/itemis/mps/gradle/GitBasedVersioning.groovy +++ b/git-based-versioning/src/main/groovy/de/itemis/mps/gradle/GitBasedVersioning.groovy @@ -86,7 +86,7 @@ class GitBasedVersioning { static String getVersion(String branch, String major, String minor, String bugfix = "", int count) { def hash = getGitShortCommitHash() def baseVersion = bugfix.isEmpty() ? "$major.$minor.$count.$hash" : "$major.$minor.$bugfix.$count.$hash" - if (branch == 'master' || branch == 'HEAD' /*this happens in detached head situations*/) { + if (branch == 'master' || branch == 'main' || branch == 'HEAD' /*this happens in detached head situations*/) { return baseVersion }