diff --git a/Jenkinsfile b/Jenkinsfile index 934a7d0..af90262 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -85,8 +85,8 @@ pipeline { withCredentials([usernamePassword(credentialsId: 'NEXUS_CREDS', passwordVariable: 'NPM_PASS', usernameVariable: 'NPM_USER')]) { bat """ powershell -NonInteractive -Command "Set-Content .npmrc ('//nexus.xuqinmin.com/repository/npm-hosted/:_auth=' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(\$env:NPM_USER + ':' + \$env:NPM_PASS))) -Encoding ASCII" - npm publish --userconfig .npmrc --registry %NEXUS_REGISTRY% --pack-destination dist-private-tmp || exit 0 - node -e "const fs=require('fs'); const p=JSON.parse(fs.readFileSync('package.private.json')); fs.writeFileSync('package.json.bak', fs.readFileSync('package.json')); fs.writeFileSync('package.json', JSON.stringify(p,null,2));" + copy package.json package.json.bak + copy package.private.json package.json npm publish --registry %NEXUS_REGISTRY% move /Y package.json.bak package.json """