This commit is contained in:
Brendan Allan 2025-12-17 01:15:03 +08:00 committed by Dax Raad
parent b692ecf0a1
commit 0a682bcd64
2 changed files with 6 additions and 10 deletions

View file

@ -1,17 +1,8 @@
#!/usr/bin/env bun
import { $ } from "bun"
import { Script } from "@opencode-ai/script"
import { collectBinaries, collectTargets } from "./utils"
if (!Script.preview) {
for (const key of Object.keys(collectBinaries(collectTargets()))) {
if (key.includes("linux")) {
await $`cd dist/${key}/bin && tar -czf ../../${key}.tar.gz *`
} else {
await $`cd dist/${key}/bin && zip -r ../../${key}.zip *`
}
}
// Calculate SHA values
const arm64Sha = await $`sha256sum ./dist/opencode-linux-arm64.tar.gz | cut -d' ' -f1`.text().then((x) => x.trim())
const x64Sha = await $`sha256sum ./dist/opencode-linux-x64.tar.gz | cut -d' ' -f1`.text().then((x) => x.trim())

View file

@ -1,9 +1,14 @@
#!/usr/bin/env bun
import { Script } from "@opencode-ai/script"
import { $ } from "bun"
await $`gh release edit ${process.env.OPENCODE_RELEASE_TAG} --draft=false`
if (!Script.preview) {
await $`gh release edit ${process.env.OPENCODE_RELEASE_TAG} --draft=false`
}
await $`bun install`
await $`gh release download --pattern "opencode-linux-*64.tar.gz" --pattern "opencode-darwin-*64.zip" -D dist`
await import(`../packages/opencode/script/publish-registries.ts`)