mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-12-18 15:47:46 +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 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 branch = if (!travisBranch.isNullOrBlank()) travisBranch else try {
|
||||
val githubShaInfo: String? = System.getenv("GITHUB_SHA")?.substring(0, 10) // version details doesn't work on gh actions
|
||||
val branch = if (!githubShaInfo.isNullOrBlank()) githubShaInfo else try {
|
||||
versionDetails().branchName
|
||||
} catch (e: Exception) {
|
||||
"unknown"
|
||||
|
Loading…
Reference in New Issue
Block a user