From e7b80a2a2fb1ec6ab48ff294a158773bcb1af270 Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Sun, 12 Jul 2020 16:47:56 -0300 Subject: [PATCH] fix branch name on travis --- build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 6fe76e0..66ce1c8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,8 @@ group = "com.github.creeper123123321.viafabric" val gitVersion: groovy.lang.Closure by extra val versionDetails: groovy.lang.Closure by extra version = "0.2.5-SNAPSHOT+" + try { - gitVersion() + "-" + versionDetails().branchName + val travisBranch: String? = System.getenv("TRAVIS_BRANCH") // version details doesn't work on travis + gitVersion() + "-" + if (travisBranch.isNullOrBlank()) versionDetails().branchName else travisBranch } catch (e: Exception) { e.printStackTrace() "unknown"