MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / createReleaseAssets

Function createReleaseAssets

apps/cli/src/build.ts:813–832  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

811].join("\n");
812
813const 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

Callers 1

build.tsFile · 0.85

Calls 1

logMethod · 0.80

Tested by

no test coverage detected