Skip to content

Commit ef87bc0

Browse files
authored
Merge pull request #10 from RooVetGit/chore/publishRooClineToCodeArtifact
Publish Roo Cline to AWS CodeArtifact
2 parents 94cd26c + f34c52f commit ef87bc0

File tree

6 files changed

+94
-5
lines changed

6 files changed

+94
-5
lines changed

.github/workflows/npm-publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish to NPM
2+
on:
3+
push:
4+
branches: ["main"]
5+
workflow_dispatch:
6+
7+
env:
8+
AWS_REGION: us-east-1
9+
10+
jobs:
11+
publish-npm:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- id: install-aws-cli
16+
uses: unfor19/install-aws-cli-action@v1
17+
with:
18+
version: 2 # default
19+
verbose: false # default
20+
arch: amd64 # allowed values: amd64, arm64
21+
- name: Configure AWS Credentials
22+
uses: aws-actions/configure-aws-credentials@v1-node16
23+
with:
24+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
25+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
26+
aws-region: ${{ env.AWS_REGION }}
27+
- uses: actions/setup-node@v3
28+
with:
29+
node-version: 18
30+
- run: |
31+
git config user.name github-actions
32+
git config user.email [email protected]
33+
- run: |
34+
npm run co:login
35+
latest_published_version=$(npm show @roo-dev/roo-cline version)
36+
current_package_version=$(node -p "require('./package.json').version")
37+
echo "Latest published version: $latest_published_version"
38+
echo "Current package version: $current_package_version"
39+
if [ "$latest_published_version" == "$current_package_version" ]; then
40+
echo "Latest version is already published to NPM"
41+
else
42+
npm install
43+
npm run vsix
44+
npm publish
45+
echo "Successfully published to NPM"
46+
fi

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ node_modules
44
.vscode-test/
55

66
.DS_Store
7+
8+
.npmrc

assets/icons/icon_Roo.png

10.9 KB
Loading

package.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "roo-cline",
33
"displayName": "Roo Cline",
44
"description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.",
5-
"version": "2.0.1",
6-
"icon": "assets/icons/icon.png",
5+
"version": "2.0.2",
6+
"icon": "assets/icons/icon_Roo.png",
77
"galleryBanner": {
88
"color": "#617A91",
99
"theme": "dark"
@@ -12,7 +12,7 @@
1212
"vscode": "1.93.1"
1313
},
1414
"author": {
15-
"name": "Cline Bot Inc."
15+
"name": "Roo Vet"
1616
},
1717
"repository": {
1818
"type": "git",
@@ -131,7 +131,9 @@
131131
"start:webview": "cd webview-ui && npm run start",
132132
"build:webview": "cd webview-ui && npm run build",
133133
"test:webview": "cd webview-ui && npm run test",
134-
"publish:marketplace": "vsce publish && ovsx publish"
134+
"publish:marketplace": "vsce publish && ovsx publish",
135+
"co:login": "scripts/codeartifact-login.sh",
136+
"install:cline": "scripts/install-cline-latest.sh"
135137
},
136138
"devDependencies": {
137139
"@types/diff": "^5.2.1",
@@ -181,5 +183,9 @@
181183
"tree-sitter-wasms": "^0.1.11",
182184
"turndown": "^7.2.0",
183185
"web-tree-sitter": "^0.22.6"
184-
}
186+
},
187+
"files": [
188+
"bin/roo-cline-2.0.2.vsix",
189+
"assets/icons/icon_Roo.png"
190+
]
185191
}

scripts/codeartifact-login.sh

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

scripts/install-cline-latest.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# Install roo-cline
4+
echo "Installing roo-cline..."
5+
npm install roo-cline
6+
7+
# Get version of installed roo-cline
8+
VERSION=$(npm list roo-cline | grep roo-cline@ | cut -d'@' -f2 | tail -n1)
9+
echo "Installed version: $VERSION"
10+
11+
# Install extension in Cursor
12+
echo "Installing Cursor extension..."
13+
echo $VERSION
14+
cursor --install-extension "node_modules/roo-cline/bin/roo-cline-$VERSION.vsix"
15+
16+
# Uninstall roo-cline
17+
echo "Cleaning up..."
18+
npm uninstall roo-cline
19+
20+
echo "Done!"

0 commit comments

Comments
 (0)