Skip to content

Commit c63f8eb

Browse files
Handle multiple tags
1 parent 4f22f3b commit c63f8eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

buildSrc/src/main/kotlin/plugins/shared/Command.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ class CommandClass(project: Project): Project by project {
1717

1818
fun getCurrentGitTag(): String? {
1919
try {
20-
return cmd("git", "tag", "--points-at", "HEAD").ifBlank { null }
20+
val tags: List<String> = cmd("git", "tag", "--points-at", "HEAD").split('\n')
21+
return tags.lastOrNull()
2122
}
2223
catch (e: Throwable) {
2324
return null

0 commit comments

Comments
 (0)