From 4356d2fbca25b7ad2b484348349068ca969c1bce Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Wed, 31 Mar 2021 16:48:12 -0300 Subject: [PATCH] append commit hash --- build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index f78f2bf..f031f06 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,8 +13,8 @@ group = "com.github.creeper123123321.viafabric" val gitVersion: groovy.lang.Closure by extra val versionDetails: groovy.lang.Closure 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"