From 93248e7be13ddb791010e25dd845f8cd4a5eb4c6 Mon Sep 17 00:00:00 2001 From: zhenyus Date: Mon, 17 Feb 2025 19:27:05 +0800 Subject: [PATCH] ci(magicleaps): switch magicleaps alpha ci to develop branch Signed-off-by: zhenyus --- .../com/freeleaps/devops/SemanticReleasingExecutor.groovy | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy b/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy index 73c70bff..911085f6 100644 --- a/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy +++ b/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy @@ -35,8 +35,11 @@ class SemanticReleasingExecutor { steps.sh "git branch --show-current" steps.sh "semantic-release" steps.log.info("SemanticReleasingExecutor", "Semantic release completed, read latest version from VERSION file") - steps.env.LATEST_VERSION = steps.readFile('VERSION').trim() - steps.env.SEMANTIC_RELEASED = true + def released = steps.sh(script: 'test -f "VERSION"', returnStatus: true) == 0 + if (released) { + steps.env.LATEST_VERSION = steps.readFile('VERSION').trim() + steps.env.SEMANTIC_RELEASED = true + } } } }