(dir: string, name: string, version: string)
| 12 | } |
| 13 | |
| 14 | async 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 | |
| 26 | const binaries: Record<string, string> = {} |
| 27 | for (const filepath of new Bun.Glob("*/package.json").scanSync({ cwd: "./dist" })) { |
no test coverage detected