diff --git a/buildSrc/src/main/kotlin/plugins/shared/Command.kt b/buildSrc/src/main/kotlin/plugins/shared/Command.kt index 71f2bb0ac..f850bebb4 100644 --- a/buildSrc/src/main/kotlin/plugins/shared/Command.kt +++ b/buildSrc/src/main/kotlin/plugins/shared/Command.kt @@ -17,7 +17,8 @@ class CommandClass(project: Project): Project by project { fun getCurrentGitTag(): String? { try { - return cmd("git", "tag", "--points-at", "HEAD").ifBlank { null } + val tags: List = cmd("git", "tag", "--points-at", "HEAD").split('\n') + return tags.lastOrNull() } catch (e: Throwable) { return null