This commit is contained in:
primakov committed 2020-12-24 20:01:46 +03:00
1 parent 85f01f43d5
commit 8124bd6446
1 file changed
+15 -2
+15 -2
View File
@@ -1,4 +1,17 @@
stage ('production build') { stage ('production build') {
sh 'npm run build:prod'; script {
sh 'ls dist'; 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'
sh "VERSION=master npm run build:prod"
}
sh 'ls dist';
}
} }