2020-03-02 22:35:26 +03:00
|
|
|
stage ('predeploy') {
|
2020-03-02 22:47:41 +03:00
|
|
|
echo 'checking tag'
|
|
|
|
script {
|
|
|
|
if (sh(returnStdout: true, script: "git tag --contains").trim()) {
|
|
|
|
def tag = sh(returnStdout: true, script: "git tag --contains").trim()
|
|
|
|
echo 'found tag ' + tag
|
|
|
|
sh "cd dist ; echo 'mkdir ${tag}; mv ./master/* ./${tag}; rm -r -d ./master; rm version.sh' > version.sh"
|
|
|
|
} else {
|
|
|
|
echo 'tag not found'
|
|
|
|
sh "cd dist ; echo 'rm version.sh' > version.sh"
|
2020-03-02 22:35:26 +03:00
|
|
|
}
|
|
|
|
}
|
2020-03-02 22:47:41 +03:00
|
|
|
}
|
2020-03-02 22:35:26 +03:00
|
|
|
|
2020-03-02 22:47:41 +03:00
|
|
|
stage ('archiving') {
|
|
|
|
// Archive the build output artifacts.
|
|
|
|
archiveArtifacts artifacts: 'dist/*'
|
2020-03-02 22:35:26 +03:00
|
|
|
}
|