This commit is contained in:
William Bell
2025-12-01 02:38:18 +00:00
parent 21bfc71250
commit 12cef9103c

7
Jenkinsfile vendored
View File

@@ -15,8 +15,9 @@ pipeline {
stage('Detect Tag') { stage('Detect Tag') {
steps { steps {
script { script {
if (env.GIT_BRANCH?.startsWith('refs/tags/')) { def ref = sh(script: "git rev-parse --symbolic-full-name HEAD", returnStdout: true).trim()
def tag = env.GIT_BRANCH.replace('refs/tags/', '') if (ref.startsWith('refs/tags/')) {
def tag = ref.replace('refs/tags/', '')
echo "Tag detected: ${tag}" echo "Tag detected: ${tag}"
if (tag.toLowerCase().contains('unsable')) { if (tag.toLowerCase().contains('unsable')) {
@@ -28,7 +29,7 @@ pipeline {
env.TAG_NAME = tag env.TAG_NAME = tag
} else { } else {
// Normal branch push = DEV build // Normal branch push = DEV build
def branchName = env.GIT_BRANCH.replace("refs/heads/", "") def branchName = ref.replace("refs/heads/", "")
echo "Regular branch build: ${branchName}" echo "Regular branch build: ${branchName}"
// Mark display name as a dev build // Mark display name as a dev build