Проверка4
test-org/test-ci-cd/pipeline/pr-main There was a failure building this commit
Details
test-org/test-ci-cd/pipeline/pr-main There was a failure building this commit
Details
parent
00d3927df6
commit
82b6a1b765
|
|
@ -30,8 +30,10 @@ pipeline {
|
|||
stage ('Initialize variables') {
|
||||
steps {
|
||||
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) {
|
||||
lastVersion = "0.0.0"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue