Проверка4
test-org/test-ci-cd/pipeline/pr-main There was a failure building this commit Details

pull/9/head
yuobrezkov 2025-04-09 16:45:31 +03:00
parent 00d3927df6
commit 82b6a1b765
1 changed files with 4 additions and 2 deletions

6
Jenkinsfile vendored
View File

@ -30,8 +30,10 @@ pipeline {
stage ('Initialize variables') { stage ('Initialize variables') {
steps { steps {
script { script {
def lastVersion = sh(script: "git describe --tags --abbrev=0", returnStdout: true).trim() || null def hasTags = sh(script: "git tag -l | wc -l", returnStdout: true).trim().toInteger() > 0
if (hasTags) {
def lastVersion = sh(script: "git describe --tags --abbrev=0", returnStdout: true).trim()
}
if (!lastVersion) { if (!lastVersion) {
lastVersion = "0.0.0" lastVersion = "0.0.0"
} }