Проверка6
test-org/test-ci-cd/pipeline/pr-main This commit looks good
Details
test-org/test-ci-cd/pipeline/pr-main This commit looks good
Details
parent
23700c92af
commit
46172a59a7
|
|
@ -32,11 +32,11 @@ pipeline {
|
|||
script {
|
||||
def hasTags = sh(script: "git tag -l | wc -l", returnStdout: true).trim().toInteger() > 0
|
||||
echo "${hasTags}"
|
||||
|
||||
def lastVersion = "0.0.0"
|
||||
|
||||
if (hasTags) {
|
||||
def lastVersion = sh(script: "git describe --tags --abbrev=0", returnStdout: true).trim()
|
||||
}
|
||||
if (!lastVersion) {
|
||||
lastVersion = "0.0.0"
|
||||
lastVersion = sh(script: "git describe --tags --abbrev=0", returnStdout: true).trim()
|
||||
}
|
||||
|
||||
echo "Last version: ${lastVersion}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue