From 9758c6974495b5755c9e2cd98a8cd4c2951e58c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=A2=D0=BE=D0=BB?= =?UTF-8?q?=D1=81=D1=82=D1=8B=D1=85?= Date: Fri, 30 Jan 2026 19:39:37 +0300 Subject: [PATCH] =?UTF-8?q?=D0=AD=D0=BA=D1=80=D0=B0=D0=BD=D0=B8=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20$?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6115c80..40f80db 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,17 +18,23 @@ pipeline { stage('Extract VERSION') { steps { script { + def versionFile = "src/main/resources/META-INF/ncore-product/${env.PRODUCT_GROUP}/version.properties" + + if (!fileExists(versionFile)) { + error "Version file not found: ${versionFile}" + } + env.VERSION = sh( script: """ set -e - VERSION=\$(sed -n 's/^version=//p' ${versionFile}) + VERSION=\\\$(sed -n 's/^version=//p' ${versionFile}) - if [[ ! "\$VERSION" =~ ^[0-9]+(\\.[0-9]+)*(-[A-Za-z]+)?$ ]]; then - echo "Invalid version format: \$VERSION" >&2 + if [[ ! "\\\$VERSION" =~ ^[0-9]+(\\\\.[0-9]+)*(-[A-Za-z]+)?$ ]]; then + echo "Invalid version format: \\\$VERSION" >&2 exit 1 fi - echo "\$VERSION" + echo "\\\$VERSION" """, returnStdout: true ).trim()