jenkins-scripts/build/prod/Jenkinsfile

18 lines
520 B
Plaintext
Raw Normal View History

2020-03-02 22:35:26 +03:00
stage ('production build') {
2020-12-24 19:46:47 +03:00
script {
def tag = sh(returnStdout: true, script: "git tag --contains").trim()
def branchName = sh(returnStdout: true, script: "git rev-parse --abbrev-ref HEAD").trim()
if (tag) {
echo 'found tag ' + tag
def tagNoV = tag.substring(1)
sh "VERSION=${tagNoV} npm run build:prod";
} else {
echo 'tag not found'
2024-04-09 23:57:42 +03:00
sh "VERSION=${branchName} npm run build:prod"
2020-12-24 19:46:47 +03:00
}
sh 'ls dist';
}
2020-03-02 22:35:26 +03:00
}