Untitled
unknown
plain_text
21 days ago
1.1 kB
2
Indexable
Never
- echo $SDK_VERSION - if [ "$SDK_VERSION" -le 16 ]; then - echo "Unable to find .npmrc, Creating one" - echo "registry = $NPM_REGISTRY_BASE_URL/$REPO/" >> .npmrc - echo "email=$GITLAB_USER_EMAIL" >> .npmrc - echo "_auth=$REPO_TOKEN" >> .npmrc - npmrc_file_created="true" - else - echo "Unable to find .npmrc, Creating one" - echo "registry = $NPM_REGISTRY_BASE_URL/$REPO/" >> .npmrc - echo "email=$GITLAB_USER_EMAIL" >> .npmrc - echo "$(echo $NPM_REGISTRY_BASE_URL | cut -c6-)/$REPO/:_auth=$REPO_TOKEN" >> .npmrc - npmrc_file_created="true" - fi - else - if ! grep -q "_auth" .npmrc; then - if [[ $REPO_TOKEN == "" ]]; then - echo "NPM Project token not provided." - exit 1 - else - echo "_auth=$REPO_TOKEN" >> .npmrc - else - if [ "$SDK_VERSION" -le 16 ]; then - echo "_auth=$REPO_TOKEN" >> .npmrc - else - echo "$(echo $NPM_REGISTRY_BASE_URL | cut -c6-)/$REPO/:_auth=$REPO_TOKEN" >> .npmrc
Leave a Comment