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

Function publish

packages/cli/script/publish.ts:14–19  ·  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 if (process.platform !== "win32") await $`chmod -R 755 .`.cwd(dir)
16 if (await published(name, version)) return console.log(`already published ${name}@${version}`)
17 await $`bun pm pack`.cwd(dir)
18 await $`npm publish *.tgz --access public --tag ${Script.channel}`.cwd(dir)
19}
20
21const binaries: Record<string, string> = {}
22for (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