Skip to content

Commit 7f65e4e

Browse files
committedAug 16, 2023
Prevent 'v' prefix in tag names to end up in version name
1 parent 10b6021 commit 7f65e4e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎buildSrc/src/main/kotlin/jewel.gradle.kts

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ group = "org.jetbrains.jewel"
1111

1212
val gitHubRef: String? = System.getenv("GITHUB_REF")
1313
version = when {
14-
gitHubRef?.startsWith("refs/tags/") == true -> gitHubRef.substringAfter("refs/tags/")
14+
gitHubRef?.startsWith("refs/tags/") == true -> {
15+
gitHubRef.substringAfter("refs/tags/")
16+
.removePrefix("v")
17+
}
1518
else -> "1.0.0-SNAPSHOT"
1619
}
1720

0 commit comments

Comments
 (0)
Please sign in to comment.