File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed
Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1+ AWS_VERSION=$( aws --version 2>&1 | cut -d/ -f2 | cut -d. -f1)
2+ echo " aws-cli/$AWS_VERSION "
3+
4+ if [ " $AWS_VERSION " -lt 2 ]; then
5+ echo " Skipping .npmrc generation because AWS CLI version is less than 2"
6+ else
7+ echo " Generating .npmrc"
8+ REPO_ENDPOINT=$( aws codeartifact get-repository-endpoint --domain roo --repository roo-dev --format npm | jq -r ' .repositoryEndpoint' )
9+ echo " registry=$REPO_ENDPOINT " > .npmrc
10+
11+ CODEARTIFACT_AUTH_TOKEN=$( aws codeartifact get-authorization-token --domain roo --query authorizationToken --output text)
12+
13+ REPO_PATH=$( echo $REPO_ENDPOINT | sed ' s/https://g' )
14+ echo " $REPO_PATH :_authToken=$CODEARTIFACT_AUTH_TOKEN " >> .npmrc
15+ fi
Original file line number Diff line number Diff line change @@ -5,5 +5,7 @@ node_modules
55
66.DS_Store
77
8+ .npmrc
9+
810# Builds
911bin
Original file line number Diff line number Diff line change 130130 "scripts" : {
131131 "build" : " npm run build:webview && npm run vsix" ,
132132 "build:webview" : " cd webview-ui && npm run build" ,
133+ "co:login" : " scripts/codeartifact-login.sh" ,
134+ "co:install" : " npm run co:login && npm install" ,
133135 "changeset" : " changeset" ,
134136 "check-types" : " tsc --noEmit" ,
135137 "compile" : " npm run check-types && npm run lint && node esbuild.js" ,
136138 "compile-tests" : " tsc -p . --outDir out" ,
137- "install:all" : " npm install && cd webview-ui && npm install" ,
139+ "install:all" : " npm run co: install && cd webview-ui && npm install" ,
138140 "lint" : " eslint src --ext ts" ,
139141 "package" : " npm run build:webview && npm run check-types && npm run lint && node esbuild.js --production" ,
140142 "pretest" : " npm run compile-tests && npm run compile && npm run lint" ,
You can’t perform that action at this time.
0 commit comments