Skip to content

Commit 9c27b12

Browse files
committed
Tmp fixes
1 parent 2565b74 commit 9c27b12

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ node_modules
55

66
.DS_Store
77

8+
.npmrc
9+
810
# Builds
911
bin

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,13 @@
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",

0 commit comments

Comments
 (0)