From 6a80862f8a98b8dd7a03d438e8d761071b675369 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 a55b0e6..49506fd 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"