Untitled
Anonymous
plain_text
08/28/2024 9:24 AM
1.1 KB
19
Indexable
# Check Node.js version
- NODE_VERSION=$(node -v | cut -d'.' -f1 | cut -c2-)
- if [[ $NODE_VERSION -le 16 ]]; then
- 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
- else
- echo "registry = $NPM_REGISTRY_BASE_URL/$REPO/" >> .npmrc
- echo "email=$GITLAB_USER_EMAIL" >> .npmrc
- echo "//$(echo $NPM_REGISTRY_BASE_URL | cut -c6-)/$REPO/:_authToken=$REPO_TOKEN" >> .npmrc
- fi
if [[ $NODE_VERSION -le 16 ]]; then
- echo "$(echo $NPM_REGISTRY_BASE_URL | cut -c6-)/$REPO/:_auth=$REPO_TOKEN" >> .npmrc
- else
- echo "//$(echo $NPM_REGISTRY_BASE_URL | cut -c6-)/$REPO/:_authToken=$REPO_TOKEN" >> .npmrc
- fiEditor is loading...
Leave a Comment