diff --git a/CHANGELOG.md b/CHANGELOG.md index 14bbaee..b029ffa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.28.1 + +### Fixed + +- Not only the 'master' prefix but also the 'main' prefix is now stripped when deriving the version identifier. + ## 1.28.0 ### Added diff --git a/build.gradle.kts b/build.gradle.kts index b3944f6..e2bf6dc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -24,7 +24,7 @@ plugins { id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.13.2" } -val baseVersion = "1.28.0" +val baseVersion = "1.28.1" group = "de.itemis.mps" 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 }