From 71dfd3aecace08ca99c3053a96e311c65ccf826e Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Sat, 4 Jul 2026 22:33:16 -0700 Subject: [PATCH] FN-7568: rename CLI release binary assets to fn-cli- Renames the downloadable GitHub Release CLI binaries so they don't collide with other well-known fn-named tools on a user's PATH; the local dev binary name is unchanged. - Update binaryNameForTarget in packages/cli/build.ts to emit fn-cli- instead of fn- (local dev binary stays fn/fn.exe) - Update release.yml and test-release.yml build matrices to use fn-cli-linux-x64, fn-cli-linux-arm64, fn-cli-darwin-arm64, fn-cli-windows-x64.exe - Update build-exe-cross, ci-workflow, and package-config tests to assert the new fn-cli- asset names - Add changeset documenting the release-asset rename Files changed: .changeset/fn-7568-fn-cli-release-asset.md | 7 +++++++ .github/workflows/release.yml | 8 ++++---- .github/workflows/test-release.yml | 8 ++++---- packages/cli/build.ts | 10 ++++++++-- packages/cli/src/__tests__/build-exe-cross.test.ts | 14 +++++++------- packages/cli/src/__tests__/ci-workflow.test.ts | 8 ++++---- packages/cli/src/__tests__/package-config.test.ts | 10 +++++----- 7 files changed, 39 insertions(+), 26 deletions(-) Fusion-Task-Id: FN-7568 Fusion-Task-Lineage: 1c04d763-5e2f-43e3-84b7-df8dcff8467f Co-authored-by: Fusion (runfusion.ai) --- .changeset/fn-7568-fn-cli-release-asset.md | 7 +++++++ .github/workflows/release.yml | 8 ++++---- .github/workflows/test-release.yml | 8 ++++---- packages/cli/build.ts | 10 ++++++++-- packages/cli/src/__tests__/build-exe-cross.test.ts | 14 +++++++------- packages/cli/src/__tests__/ci-workflow.test.ts | 8 ++++---- packages/cli/src/__tests__/package-config.test.ts | 10 +++++----- 7 files changed, 39 insertions(+), 26 deletions(-) create mode 100644 .changeset/fn-7568-fn-cli-release-asset.md diff --git a/.changeset/fn-7568-fn-cli-release-asset.md b/.changeset/fn-7568-fn-cli-release-asset.md new file mode 100644 index 0000000000..3ef5b22298 --- /dev/null +++ b/.changeset/fn-7568-fn-cli-release-asset.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Rename downloadable CLI release binaries to the fn-cli- base name. +category: internal +dev: `binaryNameForTarget` in `packages/cli/build.ts` and the `release.yml` / `test-release.yml` matrices now emit `fn-cli-`; the local dev binary stays `fn`/`fn.exe`. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2451ce510d..a35a0d6532 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,19 +36,19 @@ jobs: include: - os: ubuntu-latest target: bun-linux-x64 - binary: fn-linux-x64 + binary: fn-cli-linux-x64 - os: ubuntu-24.04-arm target: bun-linux-arm64 - binary: fn-linux-arm64 + binary: fn-cli-linux-arm64 - os: macos-latest target: bun-darwin-arm64 - binary: fn-darwin-arm64 + binary: fn-cli-darwin-arm64 # bun-darwin-x64 (Intel) dropped: macos-13 runners are scarce and # blocked releases by sitting queued for hours. The CLI ships # Apple-Silicon-only for macOS; desktop macOS DMG/ZIP is universal. - os: windows-latest target: bun-windows-x64 - binary: fn-windows-x64.exe + binary: fn-cli-windows-x64.exe steps: - name: Checkout diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml index 7edd2ca8fc..33f0ad5fc8 100644 --- a/.github/workflows/test-release.yml +++ b/.github/workflows/test-release.yml @@ -19,18 +19,18 @@ jobs: include: - os: ubuntu-latest target: bun-linux-x64 - binary: fn-linux-x64 + binary: fn-cli-linux-x64 - os: ubuntu-24.04-arm target: bun-linux-arm64 - binary: fn-linux-arm64 + binary: fn-cli-linux-arm64 - os: macos-latest target: bun-darwin-arm64 - binary: fn-darwin-arm64 + binary: fn-cli-darwin-arm64 # bun-darwin-x64 (Intel) dropped: macos-13 runner scarcity — CLI is # Apple-Silicon-only for macOS. Keep in sync with release.yml. - os: windows-latest target: bun-windows-x64 - binary: fn-windows-x64.exe + binary: fn-cli-windows-x64.exe steps: - name: Checkout diff --git a/packages/cli/build.ts b/packages/cli/build.ts index 479d1359af..c75a9abf3c 100644 --- a/packages/cli/build.ts +++ b/packages/cli/build.ts @@ -108,13 +108,19 @@ function targetToPrebuildName(target: BunTarget): string { /** * Map a Bun target identifier to the output binary name. - * e.g. "bun-linux-x64" → "fn-linux-x64", "bun-windows-x64" → "fn-windows-x64.exe" + * e.g. "bun-linux-x64" → "fn-cli-linux-x64", "bun-windows-x64" → "fn-cli-windows-x64.exe" + * + * FNXC:Release 2026-07-04-00:00: + * GitHub Release CLI assets use the `fn-cli-` base name (not `fn-`) so the + * downloadable binary doesn't collide with other well-known `fn` tools on a + * user's PATH. The local dev binary (defaultBinaryName) intentionally stays + * `fn`/`fn.exe` — this rename only affects cross-compiled release assets. */ function binaryNameForTarget(target: BunTarget): string { // "bun-linux-x64" → "linux-x64" const suffix = target.replace(/^bun-/, ""); const isWindows = target.includes("windows"); - return `fn-${suffix}${isWindows ? ".exe" : ""}`; + return `fn-cli-${suffix}${isWindows ? ".exe" : ""}`; } /** diff --git a/packages/cli/src/__tests__/build-exe-cross.test.ts b/packages/cli/src/__tests__/build-exe-cross.test.ts index 610e67e52b..cb7f70506c 100644 --- a/packages/cli/src/__tests__/build-exe-cross.test.ts +++ b/packages/cli/src/__tests__/build-exe-cross.test.ts @@ -25,7 +25,7 @@ function hasKnownBunSqliteLimitation(result: { stdout: string; stderr: string }) function expectedBinaryName(target: string): string { const suffix = target.replace(/^bun-/, ""); const isWindows = target.includes("windows"); - return `fn-${suffix}${isWindows ? ".exe" : ""}`; + return `fn-cli-${suffix}${isWindows ? ".exe" : ""}`; } /** @@ -51,7 +51,7 @@ const SHOULD_RUN_BUILD_EXE = describe.skipIf(!SHOULD_RUN_BUILD_EXE)("build-exe-cross: single target", () => { beforeAll(() => { - const bin = join(distDir, "fn-linux-x64"); + const bin = join(distDir, "fn-cli-linux-x64"); if (existsSync(bin)) return; execSync("bun run build.ts --target bun-linux-x64", { cwd: cliRoot, @@ -60,8 +60,8 @@ describe.skipIf(!SHOULD_RUN_BUILD_EXE)("build-exe-cross: single target", () => { }); }, 180_000); - it("produces dist/fn-linux-x64", () => { - const bin = join(distDir, "fn-linux-x64"); + it("produces dist/fn-cli-linux-x64", () => { + const bin = join(distDir, "fn-cli-linux-x64"); expect(existsSync(bin)).toBe(true); expect(statSync(bin).size).toBeGreaterThan(0); }); @@ -73,7 +73,7 @@ describe.skipIf(!SHOULD_RUN_BUILD_EXE)("build-exe-cross: single target", () => { describe.skipIf(!SHOULD_RUN_BUILD_EXE)("build-exe-cross: windows target has .exe extension", () => { beforeAll(() => { - const bin = join(distDir, "fn-windows-x64.exe"); + const bin = join(distDir, "fn-cli-windows-x64.exe"); if (existsSync(bin)) return; execSync("bun run build.ts --target bun-windows-x64", { cwd: cliRoot, @@ -82,8 +82,8 @@ describe.skipIf(!SHOULD_RUN_BUILD_EXE)("build-exe-cross: windows target has .exe }); }, 180_000); - it("produces dist/fn-windows-x64.exe", () => { - const bin = join(distDir, "fn-windows-x64.exe"); + it("produces dist/fn-cli-windows-x64.exe", () => { + const bin = join(distDir, "fn-cli-windows-x64.exe"); expect(existsSync(bin)).toBe(true); expect(statSync(bin).size).toBeGreaterThan(0); }); diff --git a/packages/cli/src/__tests__/ci-workflow.test.ts b/packages/cli/src/__tests__/ci-workflow.test.ts index 58e3f91d00..4751e59134 100644 --- a/packages/cli/src/__tests__/ci-workflow.test.ts +++ b/packages/cli/src/__tests__/ci-workflow.test.ts @@ -485,10 +485,10 @@ describe("Binary release workflow (.github/workflows/release.yml)", () => { expect(osMap["bun-windows-x64"]).toBe("windows-latest"); }); - it("maps bun-linux-arm64 to fn-linux-arm64 binary name", () => { + it("maps bun-linux-arm64 to fn-cli-linux-arm64 binary name", () => { const matrix = workflow.jobs["build-binaries"].strategy.matrix.include; const arm64Entry = matrix.find((m: any) => m.target === "bun-linux-arm64"); - expect(arm64Entry?.binary).toBe("fn-linux-arm64"); + expect(arm64Entry?.binary).toBe("fn-cli-linux-arm64"); }); it("uses softprops/action-gh-release", () => { @@ -586,10 +586,10 @@ describe("Test-release workflow (.github/workflows/test-release.yml)", () => { expect(targets).not.toContain("bun-darwin-x64"); }); - it("maps bun-linux-arm64 to fn-linux-arm64 binary name", () => { + it("maps bun-linux-arm64 to fn-cli-linux-arm64 binary name", () => { const matrix = workflow.jobs["build-binaries"].strategy.matrix.include; const arm64Entry = matrix.find((m: any) => m.target === "bun-linux-arm64"); - expect(arm64Entry?.binary).toBe("fn-linux-arm64"); + expect(arm64Entry?.binary).toBe("fn-cli-linux-arm64"); }); it("includes smoke tests with --help", () => { diff --git a/packages/cli/src/__tests__/package-config.test.ts b/packages/cli/src/__tests__/package-config.test.ts index 45afae9263..7268547855 100644 --- a/packages/cli/src/__tests__/package-config.test.ts +++ b/packages/cli/src/__tests__/package-config.test.ts @@ -96,11 +96,11 @@ describe("CLI package.json publishing config", () => { it("does not include bare 'dist' entry or globs that would match Bun binaries", () => { const bunBinaryNames = [ "fn", - "fn-linux-x64", - "fn-linux-arm64", - "fn-darwin-x64", - "fn-darwin-arm64", - "fn-windows-x64.exe", + "fn-cli-linux-x64", + "fn-cli-linux-arm64", + "fn-cli-darwin-x64", + "fn-cli-darwin-arm64", + "fn-cli-windows-x64.exe", ]; // No bare "dist" entry that would include everything expect(pkg.files).not.toContain("dist");