FN-7568: rename CLI release binary assets to fn-cli-<platform>
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-<suffix> instead of fn-<suffix> (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-<platform> 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) <noreply@runfusion.ai>
This commit is contained in:
7
.changeset/fn-7568-fn-cli-release-asset.md
Normal file
7
.changeset/fn-7568-fn-cli-release-asset.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"@runfusion/fusion": patch
|
||||
---
|
||||
|
||||
summary: Rename downloadable CLI release binaries to the fn-cli-<platform> base name.
|
||||
category: internal
|
||||
dev: `binaryNameForTarget` in `packages/cli/build.ts` and the `release.yml` / `test-release.yml` matrices now emit `fn-cli-<suffix>`; the local dev binary stays `fn`/`fn.exe`.
|
||||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -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
|
||||
|
||||
8
.github/workflows/test-release.yml
vendored
8
.github/workflows/test-release.yml
vendored
@@ -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
|
||||
|
||||
@@ -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" : ""}`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user