Add timestamp if version is NOT a release

This commit is contained in:
Johannes Frohnmeyer 2022-10-13 19:27:02 +02:00
parent c227e496c3
commit ee7402a442
Signed by: Johannes
GPG Key ID: E76429612C2929F4
1 changed files with 5 additions and 3 deletions

View File

@ -29,10 +29,12 @@ if (File(projectDir, ".git").exists()) {
}
if (changelog == "") changelog = "No changelog"
val timestamp: Long = if (project.hasProperty("timestamp")) "${project.property("timestamp")}".toLong()
else (System.currentTimeMillis() / 1000L)
if (!project.hasProperty("release")) {
val timestamp: Long = if (project.hasProperty("timestamp")) "${project.property("timestamp")}".toLong()
else (System.currentTimeMillis() / 1000L)
if (project.hasProperty("release")) versionS += "-$timestamp"
versionS += "-$timestamp"
}
println(changelog)