From cd39fcaf9131485efa4f9af808e1a85dbe4c52e8 Mon Sep 17 00:00:00 2001 From: pipinet Date: Sun, 28 Jul 2024 13:33:52 +0800 Subject: [PATCH] chroe: add earthly --- gradle/version.gradle | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/gradle/version.gradle b/gradle/version.gradle index 9f5c88a..f5561f6 100644 --- a/gradle/version.gradle +++ b/gradle/version.gradle @@ -1,13 +1,9 @@ def loadVersion() { - File file = new File("${rootProject.rootDir}/.version") - if (!file.exists()) { + def appVersion = System.getenv('APP_VERSION') + if(appVersion == null){ return '0.0.999' } - def pipelineId = System.getenv('PIPELINE_ID') - if(pipelineId == null){ - return '0.0.999' - } - return file.text + '.' + pipelineId + return appVersion } version = loadVersion()