From ec4648d2b7015f6bc4c07a3933b1c14847677e10 Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Sun, 13 Oct 2024 14:33:21 +0200 Subject: [PATCH] Simplified get version --- android/mainSample/build.gradle | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/android/mainSample/build.gradle b/android/mainSample/build.gradle index 3f6c1a644..6f2194265 100644 --- a/android/mainSample/build.gradle +++ b/android/mainSample/build.gradle @@ -67,18 +67,8 @@ dependencies { } static def getTag() { - def tagVersion = "$System.env.TAG_VERSION" - if (tagVersion == "null") { - println "No variable TAG_VERSION specified, I'm using 'git describe --abbrev=0'" - def process = "git describe --abbrev=0".execute() - tagVersion = process.text.toString().trim() - if (tagVersion.equals("")) { - println "abbrev failed, I'm using 'git --tags'" - def processT = "git describe --tags".execute() - tagVersion = processT.text.toString().trim() - } - } - return tagVersion + def process = "git describe --tags --abbrev=0".execute() + return process.text.toString().trim() } static def getGitCommitCount() {