Skip to content

Commit

Permalink
Handle multiple tags
Browse files Browse the repository at this point in the history
  • Loading branch information
toasterofbread committed Jul 28, 2024
1 parent 4f22f3b commit c63f8eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion buildSrc/src/main/kotlin/plugins/shared/Command.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> = cmd("git", "tag", "--points-at", "HEAD").split('\n')
return tags.lastOrNull()
}
catch (e: Throwable) {
return null
Expand Down

0 comments on commit c63f8eb

Please sign in to comment.