Проверка6
test-org/test-ci-cd/pipeline/pr-main This commit looks good Details

pull/9/head
yuobrezkov 2025-04-09 16:53:33 +03:00
parent 23700c92af
commit 46172a59a7
1 changed files with 4 additions and 4 deletions

8
Jenkinsfile vendored
View File

@ -32,11 +32,11 @@ pipeline {
script { script {
def hasTags = sh(script: "git tag -l | wc -l", returnStdout: true).trim().toInteger() > 0 def hasTags = sh(script: "git tag -l | wc -l", returnStdout: true).trim().toInteger() > 0
echo "${hasTags}" echo "${hasTags}"
def lastVersion = "0.0.0"
if (hasTags) { if (hasTags) {
def lastVersion = sh(script: "git describe --tags --abbrev=0", returnStdout: true).trim() lastVersion = sh(script: "git describe --tags --abbrev=0", returnStdout: true).trim()
}
if (!lastVersion) {
lastVersion = "0.0.0"
} }
echo "Last version: ${lastVersion}" echo "Last version: ${lastVersion}"