| 811 | ].join("\n"); |
| 812 | |
| 813 | const createReleaseAssets = async () => { |
| 814 | // The dir name (e.g. "executor-linux-x64") still encodes the platform tag. |
| 815 | // Don't read `pkg.name` here — under the npm:alias pattern every variant's |
| 816 | // package.json has the same `name: "executor"`, so all assets would collide |
| 817 | // on the same filename. |
| 818 | for (const entry of new Bun.Glob("executor-*/package.json").scanSync({ cwd: distDir })) { |
| 819 | const dirName = dirname(entry); |
| 820 | const pkgDir = join(distDir, dirName); |
| 821 | |
| 822 | if (dirName.includes("linux")) { |
| 823 | await $`tar -czf ${join(distDir, `${dirName}.tar.gz`)} *`.cwd(join(pkgDir, "bin")); |
| 824 | } else { |
| 825 | await $`python3 -c ${ZIP_ASSET_SCRIPT} ${join(distDir, `${dirName}.zip`)}`.cwd( |
| 826 | join(pkgDir, "bin"), |
| 827 | ); |
| 828 | } |
| 829 | |
| 830 | console.log(`Created release asset: ${dirName}`); |
| 831 | } |
| 832 | }; |
| 833 | |
| 834 | // --------------------------------------------------------------------------- |
| 835 | // Node.js launcher — resolves the platform binary shipped as an |