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

Function createReleaseAssets

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

Source from the content-addressed store, hash-verified

802].join("\n");
803
804const createReleaseAssets = async () => {
805 // The dir name (e.g. "executor-linux-x64") still encodes the platform tag.
806 // Don't read `pkg.name` here — under the npm:alias pattern every variant's
807 // package.json has the same `name: "executor"`, so all assets would collide
808 // on the same filename.
809 for (const entry of new Bun.Glob("executor-*/package.json").scanSync({ cwd: distDir })) {
810 const dirName = dirname(entry);
811 const pkgDir = join(distDir, dirName);
812
813 if (dirName.includes("linux")) {
814 await $`tar -czf ${join(distDir, `${dirName}.tar.gz`)} *`.cwd(join(pkgDir, "bin"));
815 } else {
816 await $`python3 -c ${ZIP_ASSET_SCRIPT} ${join(distDir, `${dirName}.zip`)}`.cwd(
817 join(pkgDir, "bin"),
818 );
819 }
820
821 console.log(`Created release asset: ${dirName}`);
822 }
823};
824
825// ---------------------------------------------------------------------------
826// 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