Skip to content

Commit 372600a

Browse files
committed
Refactor version property parsing to handle empty strings
1 parent db68fc3 commit 372600a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ plugins {
1313
group = "me.devnatan"
1414
version = property("version")
1515
.toString()
16-
.takeUnless { it == "unspecified" }
16+
.ifEmpty { null }
17+
?.takeUnless { it == "unspecified" }
1718
?.filterNot { it == 'v' } ?: nextGitTag()
1819

1920
fun nextGitTag(): String {

0 commit comments

Comments
 (0)