fix(win32): scripts/turbo commands would not run (#14829)
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
#!/usr/bin/env bun
|
#!/usr/bin/env bun
|
||||||
import { Script } from "@opencode-ai/script"
|
import { Script } from "@opencode-ai/script"
|
||||||
import { $ } from "bun"
|
import { $ } from "bun"
|
||||||
|
import { fileURLToPath } from "url"
|
||||||
|
|
||||||
const dir = new URL("..", import.meta.url).pathname
|
const dir = fileURLToPath(new URL("..", import.meta.url))
|
||||||
process.chdir(dir)
|
process.chdir(dir)
|
||||||
|
|
||||||
await $`bun tsc`
|
await $`bun tsc`
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"typecheck": "tsgo --noEmit",
|
"typecheck": "tsgo --noEmit",
|
||||||
"build": "./script/build.ts"
|
"build": "bun ./script/build.ts"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts",
|
".": "./src/index.ts",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env bun
|
#!/usr/bin/env bun
|
||||||
|
import { fileURLToPath } from "url"
|
||||||
|
|
||||||
const dir = new URL("..", import.meta.url).pathname
|
const dir = fileURLToPath(new URL("..", import.meta.url))
|
||||||
process.chdir(dir)
|
process.chdir(dir)
|
||||||
|
|
||||||
import { $ } from "bun"
|
import { $ } from "bun"
|
||||||
|
|||||||
@@ -2,8 +2,9 @@
|
|||||||
|
|
||||||
import { Script } from "@opencode-ai/script"
|
import { Script } from "@opencode-ai/script"
|
||||||
import { $ } from "bun"
|
import { $ } from "bun"
|
||||||
|
import { fileURLToPath } from "url"
|
||||||
|
|
||||||
const dir = new URL("..", import.meta.url).pathname
|
const dir = fileURLToPath(new URL("..", import.meta.url))
|
||||||
process.chdir(dir)
|
process.chdir(dir)
|
||||||
|
|
||||||
const pkg = (await import("../package.json").then((m) => m.default)) as {
|
const pkg = (await import("../package.json").then((m) => m.default)) as {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { $ } from "bun"
|
import { $ } from "bun"
|
||||||
import { Script } from "@opencode-ai/script"
|
import { Script } from "@opencode-ai/script"
|
||||||
|
import { fileURLToPath } from "url"
|
||||||
|
|
||||||
const highlightsTemplate = `
|
const highlightsTemplate = `
|
||||||
<!--
|
<!--
|
||||||
@@ -46,7 +47,7 @@ for (const file of pkgjsons) {
|
|||||||
await Bun.file(file).write(pkg)
|
await Bun.file(file).write(pkg)
|
||||||
}
|
}
|
||||||
|
|
||||||
const extensionToml = new URL("../packages/extensions/zed/extension.toml", import.meta.url).pathname
|
const extensionToml = fileURLToPath(new URL("../packages/extensions/zed/extension.toml", import.meta.url))
|
||||||
let toml = await Bun.file(extensionToml).text()
|
let toml = await Bun.file(extensionToml).text()
|
||||||
toml = toml.replace(/^version = "[^"]+"/m, `version = "${Script.version}"`)
|
toml = toml.replace(/^version = "[^"]+"/m, `version = "${Script.version}"`)
|
||||||
toml = toml.replaceAll(/releases\/download\/v[^/]+\//g, `releases/download/v${Script.version}/`)
|
toml = toml.replaceAll(/releases\/download\/v[^/]+\//g, `releases/download/v${Script.version}/`)
|
||||||
@@ -78,5 +79,5 @@ await import(`../packages/sdk/js/script/publish.ts`)
|
|||||||
console.log("\n=== plugin ===\n")
|
console.log("\n=== plugin ===\n")
|
||||||
await import(`../packages/plugin/script/publish.ts`)
|
await import(`../packages/plugin/script/publish.ts`)
|
||||||
|
|
||||||
const dir = new URL("..", import.meta.url).pathname
|
const dir = fileURLToPath(new URL("..", import.meta.url))
|
||||||
process.chdir(dir)
|
process.chdir(dir)
|
||||||
|
|||||||
Reference in New Issue
Block a user