MCPcopy Index your code
hub / github.com/anomalyco/opencode / publish

Function publish

packages/opencode/script/publish.ts:14–24  ·  view source on GitHub ↗
(dir: string, name: string, version: string)

Source from the content-addressed store, hash-verified

12}
13
14async function publish(dir: string, name: string, version: string) {
15 // GitHub artifact downloads can drop the executable bit, and Docker uses the
16 // unpacked dist binaries directly rather than the published tarball.
17 if (process.platform !== "win32") await $`chmod -R 755 .`.cwd(dir)
18 if (await published(name, version)) {
19 console.log(`already published ${name}@${version}`)
20 return
21 }
22 await $`bun pm pack`.cwd(dir)
23 await $`npm publish *.tgz --access public --tag ${Script.channel}`.cwd(dir)
24}
25
26const binaries: Record<string, string> = {}
27for (const filepath of new Bun.Glob("*/package.json").scanSync({ cwd: "./dist" })) {

Callers 1

publish.tsFile · 0.70

Calls 3

publishedFunction · 0.70
cwdMethod · 0.65
logMethod · 0.45

Tested by

no test coverage detected