diff --git a/jfrog-oauth/run.sh b/jfrog-oauth/run.sh index 3456d72..376e27b 100644 --- a/jfrog-oauth/run.sh +++ b/jfrog-oauth/run.sh @@ -30,13 +30,7 @@ else email=${ARTIFACTORY_EMAIL} registry=${JFROG_URL}/artifactory/api/npm/${REPOSITORY_NPM} EOF - # if npm version is greater than or equal to 9.0.0, use the new .npmrc format - if [ "$(npm --version | cut -d. -f1)" -ge 9 ]; then - echo "//${JFROG_HOST}/artifactory/api/npm/${REPOSITORY_NPM}/:_authToken=${ARTIFACTORY_ACCESS_TOKEN}" >> ~/.npmrc - else - echo "_auth=$(echo -n '${ARTIFACTORY_USERNAME}:${ARTIFACTORY_ACCESS_TOKEN}' | base64)" >> ~/.npmrc - echo "always-auth=true" >> ~/.npmrc - fi + echo "//${JFROG_HOST}/artifactory/api/npm/${REPOSITORY_NPM}/:_authToken=${ARTIFACTORY_ACCESS_TOKEN}" >> ~/.npmrc fi # Configure the `pip` to use the Artifactory "python" repository. diff --git a/jfrog-token/run.sh b/jfrog-token/run.sh index 88968c2..627d856 100644 --- a/jfrog-token/run.sh +++ b/jfrog-token/run.sh @@ -30,13 +30,7 @@ else email=${ARTIFACTORY_EMAIL} registry=${JFROG_URL}/artifactory/api/npm/${REPOSITORY_NPM} EOF - # if npm version is greater than or equal to 9.0.0, use the new npmrc format - if [ "$(npm --version | cut -d. -f1)" -ge 9 ]; then - echo "//${JFROG_HOST}/artifactory/api/npm/${REPOSITORY_NPM}/:_authToken=${ARTIFACTORY_ACCESS_TOKEN}" >> ~/.npmrc - else - echo "_auth=$(echo -n '${ARTIFACTORY_USERNAME}:${ARTIFACTORY_ACCESS_TOKEN}' | base64)" >> ~/.npmrc - echo "always-auth=true" >> ~/.npmrc - fi + echo "//${JFROG_HOST}/artifactory/api/npm/${REPOSITORY_NPM}/:_authToken=${ARTIFACTORY_ACCESS_TOKEN}" >> ~/.npmrc fi # Configure the `pip` to use the Artifactory "python" repository.