Skip to content

Commit

Permalink
Prevent 'v' prefix in tag names to end up in version name
Browse files Browse the repository at this point in the history
  • Loading branch information
rock3r committed Aug 16, 2023
1 parent 10b6021 commit 7f65e4e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion buildSrc/src/main/kotlin/jewel.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ group = "org.jetbrains.jewel"

val gitHubRef: String? = System.getenv("GITHUB_REF")
version = when {
gitHubRef?.startsWith("refs/tags/") == true -> gitHubRef.substringAfter("refs/tags/")
gitHubRef?.startsWith("refs/tags/") == true -> {
gitHubRef.substringAfter("refs/tags/")
.removePrefix("v")
}
else -> "1.0.0-SNAPSHOT"
}

Expand Down

0 comments on commit 7f65e4e

Please sign in to comment.