version=masterr on dev
This commit is contained in:
parent
d4a44a265b
commit
b266f18682
18
build/dev/Jenkinsfile
vendored
18
build/dev/Jenkinsfile
vendored
@ -1,7 +1,17 @@
|
|||||||
stage ('build') {
|
stage ('build') {
|
||||||
try {
|
script {
|
||||||
sh 'npm run build'
|
def tag = sh(returnStdout: true, script: "git tag --contains").trim()
|
||||||
} catch (error) {
|
def branchName = sh(returnStdout: true, script: "git rev-parse --abbrev-ref HEAD").trim()
|
||||||
echo error
|
|
||||||
|
if (tag) {
|
||||||
|
echo 'found tag ' + tag
|
||||||
|
def tagNoV = tag.substring(1)
|
||||||
|
sh "VERSION=${tagNoV} npm run build";
|
||||||
|
} else {
|
||||||
|
echo 'tag not found'
|
||||||
|
sh "VERSION=master npm run build"
|
||||||
|
}
|
||||||
|
|
||||||
|
sh 'ls dist';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user