fix: use scalar Set-Content with [char]10 newline for two-line .npmrc to avoid BOM and array issues
这个提交包含在:
父节点
191d742591
当前提交
09175c4612
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@ -39,7 +39,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
withCredentials([usernamePassword(credentialsId: 'NEXUS_CREDS', passwordVariable: 'NPM_PASS', usernameVariable: 'NPM_USER')]) {
|
withCredentials([usernamePassword(credentialsId: 'NEXUS_CREDS', passwordVariable: 'NPM_PASS', usernameVariable: 'NPM_USER')]) {
|
||||||
bat """
|
bat """
|
||||||
powershell -NonInteractive -Command "\$auth=[Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(\$env:NPM_USER+':'+\$env:NPM_PASS)); @('@xuqm:registry=https://nexus.xuqinmin.com/repository/npm-hosted/','//nexus.xuqinmin.com/repository/npm-hosted/:_auth='+\$auth) | Set-Content .npmrc"
|
powershell -NonInteractive -Command "\$auth=[Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(\$env:NPM_USER+':'+\$env:NPM_PASS)); Set-Content .npmrc ('@xuqm:registry=https://nexus.xuqinmin.com/repository/npm-hosted/' + [char]10 + '//nexus.xuqinmin.com/repository/npm-hosted/:_auth=' + \$auth) -Encoding ASCII"
|
||||||
npm install --legacy-peer-deps
|
npm install --legacy-peer-deps
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
@ -67,7 +67,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
withCredentials([usernamePassword(credentialsId: 'NEXUS_CREDS', passwordVariable: 'NPM_PASS', usernameVariable: 'NPM_USER')]) {
|
withCredentials([usernamePassword(credentialsId: 'NEXUS_CREDS', passwordVariable: 'NPM_PASS', usernameVariable: 'NPM_USER')]) {
|
||||||
bat """
|
bat """
|
||||||
powershell -NonInteractive -Command "\$auth=[Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(\$env:NPM_USER+':'+\$env:NPM_PASS)); @('@xuqm:registry=https://nexus.xuqinmin.com/repository/npm-hosted/','//nexus.xuqinmin.com/repository/npm-hosted/:_auth='+\$auth) | Set-Content .npmrc"
|
powershell -NonInteractive -Command "\$auth=[Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(\$env:NPM_USER+':'+\$env:NPM_PASS)); Set-Content .npmrc ('@xuqm:registry=https://nexus.xuqinmin.com/repository/npm-hosted/' + [char]10 + '//nexus.xuqinmin.com/repository/npm-hosted/:_auth=' + \$auth) -Encoding ASCII"
|
||||||
npm publish --workspaces --registry %NEXUS_REGISTRY%
|
npm publish --workspaces --registry %NEXUS_REGISTRY%
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户