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 — snapshot publish everything · steipete/opencode@ba8a4c5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • snapshot.yml
  • packages
    • plugin/script
      • publish.ts
    • sdk/js/script
      • publish.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/snapshot.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/snapshot.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
- name: Publish
3030
run: |
31-
./packages/opencode/script/publish.ts
31+
./script/publish.ts
3232
env:
3333
GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}
3434
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
Collapse file

‎packages/plugin/script/publish.ts‎

Copy file name to clipboard
+4-12Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
11
#!/usr/bin/env bun
2+
import { Script } from "@opencode-ai/script"
3+
import { $ } from "bun"
24

35
const dir = new URL("..", import.meta.url).pathname
46
process.chdir(dir)
57

6-
import { $ } from "bun"
7-
88
await $`bun tsc`
9-
109
const pkg = await import("../package.json").then((m) => m.default)
1110
const original = JSON.parse(JSON.stringify(pkg))
1211
for (const [key, value] of Object.entries(pkg.exports)) {
1312
const file = value.replace("./src/", "./dist/").replace(".ts", "")
13+
// @ts-ignore
1414
pkg.exports[key] = {
1515
import: file + ".js",
1616
types: file + ".d.ts",
1717
}
1818
}
1919
await Bun.write("package.json", JSON.stringify(pkg, null, 2))
20-
21-
const snapshot = process.env["OPENCODE_SNAPSHOT"] === "true"
22-
23-
if (snapshot) {
24-
await $`bun publish --tag snapshot --access public`
25-
}
26-
if (!snapshot) {
27-
await $`bun publish --access public`
28-
}
20+
await $`bun publish --tag ${Script.channel} --access public`
2921
await Bun.write("package.json", JSON.stringify(original, null, 2))
Collapse file

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

Copy file name to clipboard
+4-11Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/usr/bin/env bun
22

3+
import { Script } from "@opencode-ai/script"
4+
import { $ } from "bun"
5+
36
const dir = new URL("..", import.meta.url).pathname
47
process.chdir(dir)
58

6-
import { $ } from "bun"
7-
89
await import("./build")
910

1011
const pkg = await import("../package.json").then((m) => m.default)
@@ -18,13 +19,5 @@ for (const [key, value] of Object.entries(pkg.exports)) {
1819
}
1920
}
2021
await Bun.write("package.json", JSON.stringify(pkg, null, 2))
21-
22-
const snapshot = process.env["OPENCODE_SNAPSHOT"] === "true"
23-
24-
if (snapshot) {
25-
await $`bun publish --tag snapshot --access public`
26-
}
27-
if (!snapshot) {
28-
await $`bun publish --access public`
29-
}
22+
await $`bun publish --tag ${Script.channel} --access public`
3023
await Bun.write("package.json", JSON.stringify(original, null, 2))

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.