ci: Switch deployment to gh actions and use semver & java 17

This commit is contained in:
NotMyFault
2021-11-22 13:38:32 +01:00
parent 4b57a34f59
commit 507b8d5e35
7 changed files with 77 additions and 69 deletions

View File

@ -17,7 +17,8 @@ logger.lifecycle("""
*******************************************
""")
var rootVersion by extra("1.17")
var rootVersion by extra("2.0.0")
var snapshot by extra("SNAPSHOT")
var revision: String by extra("")
var buildNumber by extra("")
var date: String by extra("")
@ -27,15 +28,14 @@ ext {
}
date = git.head().dateTime.format(DateTimeFormatter.ofPattern("yy.MM.dd"))
revision = "-${git.head().abbreviatedId}"
val commit: String? = git.head().abbreviatedId
buildNumber = if (project.hasProperty("buildnumber")) {
project.properties["buildnumber"] as String
} else {
commit.toString()
null.toString() //1.18 TODO: drop classifier if not used, otherwise the version is 'null'
}
}
version = String.format("%s-%s", rootVersion, buildNumber)
version = String.format("%s-%s+%s", rootVersion, snapshot, buildNumber)
if (!project.hasProperty("gitCommitHash")) {
apply(plugin = "org.ajoberstar.grgit")