Skip to content

Commit 402ad92

Browse files
committed
Fix knip
1 parent bdb4bb6 commit 402ad92

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

.github/workflows/nightly-publish.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: Nightly Publish
22

33
on:
4-
push:
5-
branches: [main, cte/monorepo]
6-
# workflow_run:
7-
# workflows: ["Code QA Roo Code"]
8-
# types:
9-
# - completed
4+
# push:
105
# branches: [main]
6+
workflow_run:
7+
workflows: ["Code QA Roo Code"]
8+
types:
9+
- completed
10+
branches: [main]
1111
workflow_dispatch: # Allows manual triggering.
1212

1313
env:
@@ -17,7 +17,7 @@ env:
1717
jobs:
1818
publish-nightly:
1919
runs-on: ubuntu-latest
20-
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
20+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2121

2222
permissions:
2323
contents: read # No tags pushed → read is enough.

webview-ui/vite.config.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { resolve } from "path"
1+
import path, { resolve } from "path"
22
import fs from "fs"
33
import { execSync } from "child_process"
44

@@ -57,7 +57,7 @@ function getGitSha() {
5757
export default defineConfig(({ mode }) => {
5858
let outDir = "../src/webview-ui/build"
5959

60-
const pkg = JSON.parse(fs.readFileSync("../src/package.json", "utf8"))
60+
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "src", "package.json"), "utf8"))
6161
const gitSha = getGitSha()
6262

6363
const define: Record<string, any> = {
@@ -73,7 +73,11 @@ export default defineConfig(({ mode }) => {
7373
// monorepo is deployed.
7474
if (mode === "nightly") {
7575
outDir = "../apps/vscode-nightly/build/webview-ui/build"
76-
const nightlyPkg = JSON.parse(fs.readFileSync("../apps/vscode-nightly/package.nightly.json", "utf8"))
76+
77+
const nightlyPkg = JSON.parse(
78+
fs.readFileSync(path.join(__dirname, "..", "apps", "vscode-nightly", "package.nightly.json"), "utf8"),
79+
)
80+
7781
define["process.env.PKG_NAME"] = JSON.stringify(nightlyPkg.name)
7882
define["process.env.PKG_VERSION"] = JSON.stringify(nightlyPkg.version)
7983
define["process.env.PKG_OUTPUT_CHANNEL"] = JSON.stringify("Roo-Code-Nightly")

0 commit comments

Comments
 (0)