mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-12-21 16:17:37 +01:00
append commit hash
This commit is contained in:
parent
333b2e0eab
commit
d29d8235db
@ -13,8 +13,8 @@ group = "com.github.creeper123123321.viafabric"
|
|||||||
val gitVersion: groovy.lang.Closure<String> by extra
|
val gitVersion: groovy.lang.Closure<String> by extra
|
||||||
val versionDetails: groovy.lang.Closure<com.palantir.gradle.gitversion.VersionDetails> by extra
|
val versionDetails: groovy.lang.Closure<com.palantir.gradle.gitversion.VersionDetails> by extra
|
||||||
|
|
||||||
val travisBranch: String? = System.getenv("TRAVIS_BRANCH") // version details doesn't work on travis
|
val githubShaInfo: String? = System.getenv("GITHUB_SHA")?.substring(0, 10) // version details doesn't work on gh actions
|
||||||
val branch = if (!travisBranch.isNullOrBlank()) travisBranch else try {
|
val branch = if (!githubShaInfo.isNullOrBlank()) githubShaInfo else try {
|
||||||
versionDetails().branchName
|
versionDetails().branchName
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
"unknown"
|
"unknown"
|
||||||
|
Loading…
Reference in New Issue
Block a user