diff --git a/git-based-versioning/CHANGELOG.md b/git-based-versioning/CHANGELOG.md index eeb7e98..c5d39ce 100644 --- a/git-based-versioning/CHANGELOG.md +++ b/git-based-versioning/CHANGELOG.md @@ -1,3 +1,7 @@ # 1.0.0 Initial version, extracted from `mps-gradle-plugin`. + +# 1.1.0 + +Not only the 'master' prefix but also the 'main' prefix is now stripped when deriving the version identifier. diff --git a/git-based-versioning/build.gradle.kts b/git-based-versioning/build.gradle.kts index 41f9a21..8d90554 100644 --- a/git-based-versioning/build.gradle.kts +++ b/git-based-versioning/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } group = "de.itemis.mps.gradle" -version = "1.0" +version = "1.1.0" dependencies { implementation(gradleApi()) 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 }