| 833 | ].join("\n"); |
| 834 | |
| 835 | const createReleaseAssets = async () => { |
| 836 | // The dir name (e.g. "executor-linux-x64") still encodes the platform tag. |
| 837 | // Don't read `pkg.name` here — under the npm:alias pattern every variant's |
| 838 | // package.json has the same `name: "executor"`, so all assets would collide |
| 839 | // on the same filename. |
| 840 | for (const entry of new Bun.Glob("executor-*/package.json").scanSync({ cwd: distDir })) { |
| 841 | const dirName = dirname(entry); |
| 842 | const pkgDir = join(distDir, dirName); |
| 843 | |
| 844 | if (dirName.includes("linux")) { |
| 845 | await $`tar -czf ${join(distDir, `${dirName}.tar.gz`)} *`.cwd(join(pkgDir, "bin")); |
| 846 | } else { |
| 847 | await $`python3 -c ${ZIP_ASSET_SCRIPT} ${join(distDir, `${dirName}.zip`)}`.cwd( |
| 848 | join(pkgDir, "bin"), |
| 849 | ); |
| 850 | } |
| 851 | |
| 852 | console.log(`Created release asset: ${dirName}`); |
| 853 | } |
| 854 | }; |
| 855 | |
| 856 | // --------------------------------------------------------------------------- |
| 857 | // Node.js launcher — resolves the platform binary shipped as an |