pull/115/head
Muhammad Atif Ali 2 years ago
parent 489fcd12e7
commit 5b1337e96e

@ -33,7 +33,7 @@ email=${ARTIFACTORY_EMAIL}
registry=${JFROG_URL}/artifactory/api/npm/${REPOSITORY_NPM}
EOF
if [ "$(npm --version | cut -d. -f1)" -ge 9 ]; then
echo "//${JFROG_URL}/artifactory/api/npm/${REPOSITORY_NPM}/:_authToken=${ARTIFACTORY_ACCESS_TOKEN}" >> ~/.npmrc
echo "//${JFROG_HOST}/artifactory/api/npm/${REPOSITORY_NPM}/:_authToken=${ARTIFACTORY_ACCESS_TOKEN}" >> ~/.npmrc
else
echo "_auth=${ARTIFACTORY_ACCESS_TOKEN}" >> ~/.npmrc
echo "always-auth=true" >> ~/.npmrc

@ -30,7 +30,7 @@ else
# if npm version is greater than or equal to 9.0.0, use the new npmrc format
cat << EOF > ~/.npmrc
email=${ARTIFACTORY_EMAIL}
registry=${JFROG_URL}/artifactory/api/npm/${REPOSITORY_NPM}
registry=${JFROG_HOST}/artifactory/api/npm/${REPOSITORY_NPM}
EOF
if [ "$(npm --version | cut -d. -f1)" -ge 9 ]; then
echo "//${JFROG_URL}/artifactory/api/npm/${REPOSITORY_NPM}/:_authToken=${ARTIFACTORY_ACCESS_TOKEN}" >> ~/.npmrc

Loading…
Cancel
Save