GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ci: ignore · ferrao/opencode@d4bac5c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/sdk/js/script
    • generate.ts
  • script
    • publish.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/sdk/js/script/generate.ts‎

Copy file name to clipboardExpand all lines: packages/sdk/js/script/generate.ts
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ process.chdir(dir)
66
import { $ } from "bun"
77
import path from "path"
88

9-
console.log("=== Generating JS SDK ===")
10-
console.log()
11-
129
import { createClient } from "@hey-api/openapi-ts"
1310

1411
await $`bun dev generate > ${dir}/openapi.json`.cwd(path.resolve(dir, "../../opencode"))
Collapse file

‎script/publish.ts‎

Copy file name to clipboardExpand all lines: script/publish.ts
+14-9Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import { $ } from "bun"
44

5+
console.log("=== publishing ===\n")
6+
57
const snapshot = process.env["OPENCODE_SNAPSHOT"] === "true"
68
const version = snapshot
79
? `0.0.0-${new Date().toISOString().slice(0, 16).replace(/[-:T]/g, "")}`
@@ -10,24 +12,29 @@ if (!version) {
1012
throw new Error("OPENCODE_VERSION is required")
1113
}
1214
process.env["OPENCODE_VERSION"] = version
15+
console.log("version:", version)
1316

1417
const pkgjsons = await Array.fromAsync(
1518
new Bun.Glob("**/package.json").scan({
1619
absolute: true,
1720
}),
18-
)
21+
).then((arr) => arr.filter((x) => !x.includes("node_modules") && !x.includes("dist")))
1922

2023
const tree = await $`git add . && git write-tree`.text().then((x) => x.trim())
21-
for await (const file of new Bun.Glob("**/package.json").scan({
22-
absolute: true,
23-
})) {
24+
for (const file of pkgjsons) {
2425
let pkg = await Bun.file(file).text()
2526
pkg = pkg.replaceAll(/"version": "[^"]+"/g, `"version": "${version}"`)
27+
console.log("updated:", file)
2628
await Bun.file(file).write(pkg)
2729
}
2830

29-
await import(`../packages/opencode/script/publish.ts`)
31+
console.log("\n=== opencode ===\n")
32+
// await import(`../packages/opencode/script/publish.ts`)
33+
34+
console.log("\n=== sdk ===\n")
3035
await import(`../packages/sdk/js/script/publish.ts`)
36+
37+
console.log("\n=== plugin ===\n")
3138
await import(`../packages/plugin/script/publish.ts`)
3239
// await import(`../packages/sdk/stainless/generate.ts`)
3340

@@ -43,9 +50,7 @@ if (snapshot) {
4350
await $`git push origin v${version} --no-verify`
4451
await $`git checkout dev`
4552
await $`git branch -D snapshot-${version}`
46-
for await (const file of new Bun.Glob("**/package.json").scan({
47-
absolute: true,
48-
})) {
49-
$`await git checkout ${tree} ${file}`
53+
for (const file of pkgjsons) {
54+
await $`git checkout ${tree} ${file}`
5055
}
5156
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.