| 882 | ].join("\n"); |
| 883 | |
| 884 | const createReleaseAssets = async () => { |
| 885 | // The dir name (e.g. "executor-linux-x64") still encodes the platform tag. |
| 886 | // Don't read `pkg.name` here — under the npm:alias pattern every variant's |
| 887 | // package.json has the same `name: "executor"`, so all assets would collide |
| 888 | // on the same filename. |
| 889 | for (const entry of new Bun.Glob("executor-*/package.json").scanSync({ cwd: distDir })) { |
| 890 | const dirName = dirname(entry); |
| 891 | const pkgDir = join(distDir, dirName); |
| 892 | |
| 893 | if (dirName.includes("linux")) { |
| 894 | await $`tar -czf ${join(distDir, `${dirName}.tar.gz`)} *`.cwd(join(pkgDir, "bin")); |
| 895 | } else { |
| 896 | await $`python3 -c ${ZIP_ASSET_SCRIPT} ${join(distDir, `${dirName}.zip`)}`.cwd( |
| 897 | join(pkgDir, "bin"), |
| 898 | ); |
| 899 | } |
| 900 | |
| 901 | console.log(`Created release asset: ${dirName}`); |
| 902 | } |
| 903 | }; |
| 904 | |
| 905 | // --------------------------------------------------------------------------- |
| 906 | // Node.js launcher — resolves the platform binary shipped as an |