Проверка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 {
|
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}"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue