Untitled
unknown
plain_text
23 days ago
1.2 kB
1
Indexable
Never
- if [ "$SDK_VERSION" -le 16 ]; then - echo "Version is less than or equal to 16" - 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 "Node version is greater than 20" - 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 - 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 - fi - fi
Leave a Comment