From c2c9ea4e36a77c17dd38fdb8e9ca7d882f08c130 Mon Sep 17 00:00:00 2001 From: XuqmGroup Date: Mon, 18 May 2026 21:21:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20correct=20private=20SDK=20publish=20?= =?UTF-8?q?step=20=E2=80=94=20remove=20bad=20||=20exit=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Windows bat, 'cmd || exit 0' exits the script on failure, preventing the package.json swap and private publish from running. Co-Authored-By: Claude Sonnet 4.6 --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 """