withNPM
This commit is contained in:
1
publish/Jenkinsfile
vendored
1
publish/Jenkinsfile
vendored
@@ -4,6 +4,7 @@ stage ('publish') {
|
||||
def tag = sh(returnStdout: true, script: "git tag --contains").trim()
|
||||
if (tag) {
|
||||
echo 'found tag ' + tag
|
||||
sh "echo '${JEN_FILES_TMP_NAME}' >> .npmignore"
|
||||
sh 'npm publish --access public'
|
||||
} else {
|
||||
echo 'tag not found'
|
||||
|
||||
16
publish/new/Jenkinsfile
vendored
Normal file
16
publish/new/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
stage ('publish') {
|
||||
echo 'checking tag'
|
||||
script {
|
||||
def tag = sh(returnStdout: true, script: "git tag --contains").trim()
|
||||
if (tag) {
|
||||
echo 'found tag ' + tag
|
||||
sh "echo '${JEN_FILES_TMP_NAME}' >> .npmignore"
|
||||
withNPM(npmrcConfig:'npm-cfg') {
|
||||
echo "Performing npm build..."
|
||||
sh 'npm publish --access public'
|
||||
}
|
||||
} else {
|
||||
echo 'tag not found'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user