Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Nightly Publish
name: Publish Roo Code Next

on:
workflow_run:
Expand All @@ -13,7 +13,7 @@ env:
PNPM_VERSION: 10.8.1

jobs:
publish-nightly:
publish-next:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}

Expand All @@ -36,7 +36,7 @@ jobs:
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Forge numeric Nightly version
- name: Forge numeric version
id: version
env:
RUN_NUMBER: ${{ github.run_number }}
Expand All @@ -48,15 +48,15 @@ jobs:
node <<'EOF'
const fs = require('fs');
const path = require('path');
const pkgPath = path.join(__dirname, 'apps', 'vscode-nightly', 'package.nightly.json');
const pkgPath = path.join(__dirname, 'apps', 'vscode-next', 'package.next.json');
const pkg = JSON.parse(fs.readFileSync(pkgPath,'utf8'));
const [maj, min] = pkg.version.split('.');
pkg.version = `${maj}.${min}.${process.env.VERSION_NUMBER}`;
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2));
console.log(`🔖 Nightly version set to ${pkg.version}`);
console.log(`🔖 Version set to ${pkg.version}`);
EOF
- name: Build VSIX
run: pnpm build:nightly # Produces bin/roo-code-nightly-0.0.[count].vsix
run: pnpm build:next # Produces bin/roo-code-next-0.0.[count].vsix
- name: Publish to VS Code Marketplace
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)

async function main() {
const name = "extension-nightly"
const name = "extension-next"
const production = process.argv.includes("--production")
const minify = production
const sourcemap = !production

const overrideJson = JSON.parse(fs.readFileSync(path.join(__dirname, "package.nightly.json"), "utf8"))
const overrideJson = JSON.parse(fs.readFileSync(path.join(__dirname, "package.next.json"), "utf8"))
console.log(`[${name}] name: ${overrideJson.name}`)
console.log(`[${name}] version: ${overrideJson.version}`)

Expand All @@ -35,7 +35,7 @@ async function main() {
define: {
"process.env.PKG_NAME": '"roo-code-nightly"',
"process.env.PKG_VERSION": `"${overrideJson.version}"`,
"process.env.PKG_OUTPUT_CHANNEL": '"Roo-Code-Nightly"',
"process.env.PKG_OUTPUT_CHANNEL": '"Roo-Code-Next"',
...(gitSha ? { "process.env.PKG_SHA": `"${gitSha}"` } : {}),
},
}
Expand Down Expand Up @@ -108,13 +108,13 @@ async function main() {

const nlsPkg = JSON.parse(fs.readFileSync(path.join(srcDir, "package.nls.json"), "utf8"))

const nlsNightlyPkg = JSON.parse(
fs.readFileSync(path.join(__dirname, "package.nls.nightly.json"), "utf8"),
const nlsNextPkg = JSON.parse(
fs.readFileSync(path.join(__dirname, "package.nls.next.json"), "utf8"),
)

fs.writeFileSync(
path.join(buildDir, "package.nls.json"),
JSON.stringify({ ...nlsPkg, ...nlsNightlyPkg }, null, 2),
JSON.stringify({ ...nlsPkg, ...nlsNextPkg }, null, 2),
)

console.log(`[generatePackageJson] Generated package.nls.json`)
Expand Down
14 changes: 14 additions & 0 deletions apps/vscode-next/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "@roo-code/vscode-next",
"description": "'Next' build for the Roo Code VSCode extension.",
"private": true,
"packageManager": "[email protected]",
"scripts": {
"bundle:next": "node esbuild.mjs",
"vsix:next": "cd build && mkdirp ../../../bin && npx vsce package --no-dependencies --out ../../../bin",
"clean": "rimraf build .turbo"
},
"devDependencies": {
"@roo-code/build": "workspace:^"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "roo-code-nightly",
"version": "0.0.1",
"icon": "assets/icons/icon-nightly.png",
"icon": "assets/icons/icon-next.png",
"scripts": {}
}
7 changes: 7 additions & 0 deletions apps/vscode-next/package.nls.next.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extension.displayName": "Roo Code Next",
"views.contextMenu.label": "Roo Code Next",
"views.terminalMenu.label": "Roo Code Next",
"views.activitybar.title": "Roo Code Next",
"configuration.title": "Roo Code Next"
}
14 changes: 0 additions & 14 deletions apps/vscode-nightly/package.json

This file was deleted.

7 changes: 0 additions & 7 deletions apps/vscode-nightly/package.nls.nightly.json

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"test": "turbo test --log-order grouped --output-logs new-only",
"format": "turbo format --log-order grouped --output-logs new-only",
"bundle": "turbo bundle --log-order grouped --output-logs new-only",
"bundle:nightly": "turbo bundle:nightly --log-order grouped --output-logs new-only",
"bundle:next": "turbo bundle:next --log-order grouped --output-logs new-only",
"build": "turbo vsix --log-order grouped --output-logs new-only",
"build:nightly": "turbo vsix:nightly --log-order grouped --output-logs new-only",
"build:next": "turbo vsix:next --log-order grouped --output-logs new-only",
"clean": "turbo clean --log-order grouped --output-logs new-only && rimraf dist out bin .vite-port .turbo",
"changeset:version": "cp CHANGELOG.md src/CHANGELOG.md && changeset version && cp -vf src/CHANGELOG.md .",
"knip": "knip --include files",
Expand Down
8 changes: 4 additions & 4 deletions packages/build/src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,22 +109,22 @@ describe("generatePackageJson", () => {
},
overrideJson: {
name: "roo-code-nightly",
displayName: "Roo Code Nightly",
displayName: "Roo Code Next",
publisher: "RooVeterinaryInc",
version: "0.0.1",
icon: "assets/icons/icon-nightly.png",
icon: "assets/icons/icon-next.png",
scripts: {},
},
substitution: ["roo-cline", "roo-code-nightly"],
})

expect(generatedPackageJson).toStrictEqual({
name: "roo-code-nightly",
displayName: "Roo Code Nightly",
displayName: "Roo Code Next",
description: "%extension.description%",
publisher: "RooVeterinaryInc",
version: "0.0.1",
icon: "assets/icons/icon-nightly.png",
icon: "assets/icons/icon-next.png",
contributes: {
viewsContainers: {
activitybar: [
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes
8 changes: 4 additions & 4 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@
"outputs": ["dist/**"],
"inputs": ["src/**", "package.json", "tsconfig.json", "tsup.config.ts"]
},
"build:nightly": {},
"build:next": {},
"bundle": {
"dependsOn": ["^build"],
"cache": false
},
"bundle:nightly": {
"bundle:next": {
"dependsOn": ["^build"],
"cache": false
},
"vsix": {
"dependsOn": ["bundle", "@roo-code/vscode-webview#build"],
"cache": false
},
"vsix:nightly": {
"dependsOn": ["bundle:nightly", "@roo-code/vscode-webview#build:nightly"],
"vsix:next": {
"dependsOn": ["bundle:next", "@roo-code/vscode-webview#build:next"],
"cache": false
},
"watch:bundle": {
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"format": "prettier --write src",
"dev": "vite",
"build": "tsc -b && vite build",
"build:nightly": "tsc -b && vite build --mode nightly",
"build:next": "tsc -b && vite build --mode next",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
Expand Down
14 changes: 7 additions & 7 deletions webview-ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ export default defineConfig(({ mode }) => {

// TODO: We can use `@roo-code/build` to generate `define` once the
// monorepo is deployed.
if (mode === "nightly") {
outDir = "../apps/vscode-nightly/build/webview-ui/build"
if (mode === "next") {
outDir = "../apps/vscode-next/build/webview-ui/build"

const nightlyPkg = JSON.parse(
fs.readFileSync(path.join(__dirname, "..", "apps", "vscode-nightly", "package.nightly.json"), "utf8"),
const nextPkg = JSON.parse(
fs.readFileSync(path.join(__dirname, "..", "apps", "vscode-next", "package.next.json"), "utf8"),
)

define["process.env.PKG_NAME"] = JSON.stringify(nightlyPkg.name)
define["process.env.PKG_VERSION"] = JSON.stringify(nightlyPkg.version)
define["process.env.PKG_OUTPUT_CHANNEL"] = JSON.stringify("Roo-Code-Nightly")
define["process.env.PKG_NAME"] = JSON.stringify(nextPkg.name)
define["process.env.PKG_VERSION"] = JSON.stringify(nextPkg.version)
define["process.env.PKG_OUTPUT_CHANNEL"] = JSON.stringify("Roo-Code-Next")
}

const plugins: PluginOption[] = [react(), tailwindcss(), persistPortPlugin(), wasmPlugin()]
Expand Down
Loading