From d7f5e4744b03307a2ee41d11f381d59c5780ad8b Mon Sep 17 00:00:00 2001 From: William Bell <62452284+Ugric@users.noreply.github.com> Date: Mon, 1 Dec 2025 02:43:03 +0000 Subject: [PATCH] fix jenkins --- Jenkinsfile | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b62697f..089c437 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,11 +6,30 @@ pipeline { } stages { stage('Checkout') { - steps { - checkout scm - sh 'git submodule update --init --recursive' - } + steps { + script { + // Detect if this is a tag build via Jenkins-supplied vars + if (env.GIT_TAG) { + echo "Checking out tag: ${env.GIT_TAG}" + checkout([ + $class: 'GitSCM', + branches: [[name: "refs/tags/${env.GIT_TAG}"]], + userRemoteConfigs: [[url: scm.userRemoteConfigs[0].url]], + doGenerateSubmoduleConfigurations: false, + extensions: [ + [$class: 'SubmoduleUpdate', recursiveSubmodules: true] + ] + ]) + } else { + echo "Checking out normal branch" + checkout scm + } + + // update submodules + sh 'git submodule update --init --recursive' + } } + } stage('Detect Tag') { steps {