GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — opencode/packages/opencode/script/publish.ts at dev · bpd1069/opencode Expand file tree/ Copy pathpublish.tsMore file actions executable file ·70 lines (62 loc) · 2.04 KB / Copy pathpublish.tsFile metadata and controlsexecutable file ·70 lines (62 loc) · 2.04 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 #!/usr/bin/env bun import { $ } from "bun" import pkg from "../package.json" import { Script } from "@opencode-ai/script" import { fileURLToPath } from "url" const dir = fileURLToPath(new URL("..", import.meta.url)) process.chdir(dir) const { binaries } = await import("./build.ts") { const name = `${pkg.name}-${process.platform}-${process.arch}` console.log(`smoke test: running dist/${name}/bin/opencode --version`) await $`./dist/${name}/bin/opencode --version` } await $`mkdir -p ./dist/${pkg.name}` await $`cp -r ./bin ./dist/${pkg.name}/bin` await $`cp ./script/postinstall.mjs ./dist/${pkg.name}/postinstall.mjs` await Bun.file(`./dist/${pkg.name}/package.json`).write( JSON.stringify( { name: pkg.name + "-ai", bin: { [pkg.name]: `./bin/${pkg.name}`, }, scripts: { postinstall: "bun ./postinstall.mjs || node ./postinstall.mjs", }, version: Script.version, optionalDependencies: binaries, }, null, 2, ), ) const tags = [Script.channel] const tasks = Object.entries(binaries).map(async ([name]) => { if (process.platform !== "win32") { await $`chmod -R 755 .`.cwd(`./dist/${name}`) } await $`bun pm pack`.cwd(`./dist/${name}`) for (const tag of tags) { await $`npm publish *.tgz --access public --tag ${tag}`.cwd(`./dist/${name}`) } }) await Promise.all(tasks) for (const tag of tags) { await $`cd ./dist/${pkg.name} && bun pm pack && npm publish *.tgz --access public --tag ${tag}` } if (!Script.preview) { // Create archives for GitHub release for (const key of Object.keys(binaries)) { if (key.includes("linux")) { await $`tar -czf ../../${key}.tar.gz *`.cwd(`dist/${key}/bin`) } else { await $`zip -r ../../${key}.zip *`.cwd(`dist/${key}/bin`) } } const image = "ghcr.io/anomalyco/opencode" const platforms = "linux/amd64,linux/arm64" const tags = [`${image}:${Script.version}`, `${image}:latest`] const tagFlags = tags.flatMap((t) => ["-t", t]) await $`docker buildx build --platform ${platforms} ${tagFlags} --push .` } |
| 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. |