Skip to content

Commit

Permalink
No need for regex here
Browse files Browse the repository at this point in the history
  • Loading branch information
npresseault committed Aug 1, 2024
1 parent 68b6980 commit 38473eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ tasks {
destinationFile.set(file("${rootDir}/gradle.properties"))
properties(java.util.Properties().apply { load(destinationFile.asFile.get().reader()) }.mapKeys { it.key.toString() })
val gitCommits = "git rev-list --count HEAD".runCommand(workingDir = rootDir)
val originalVersion = project.version.toString().replace("-dev\\w+".toRegex(), "").replace("-SNAPSHOT".toRegex(), "")
val originalVersion = project.version.toString().replace("-dev\\w+".toRegex(), "").replace("-SNAPSHOT", "")
property("version", "$originalVersion-dev$gitCommits")
}
val tagVersion by registering(TagVersionTask::class)
Expand Down

0 comments on commit 38473eb

Please sign in to comment.