tftsr-devops_investigation/tests/unit/releaseWorkflowMacBundle.test.ts
Shaun Arman 44e6095bad
Some checks failed
Test / rust-clippy (push) Failing after 12m12s
Test / frontend-typecheck (push) Has been cancelled
Test / frontend-tests (push) Has been cancelled
Test / wiki-sync (push) Has been cancelled
Test / rust-fmt-check (push) Successful in 1m27s
Test / rust-tests (push) Has been cancelled
fix: resolve macOS bundle path after app rename
Find the generated .app bundle dynamically in release CI so macOS packaging no longer depends on the legacy TFTSR.app name. Add a unit test to prevent regressions by asserting the old hardcoded path is not reintroduced.

Made-with: Cursor
2026-04-04 16:28:01 -05:00

24 lines
706 B
TypeScript

import { describe, expect, it } from "vitest";
import { readFileSync } from "node:fs";
import path from "node:path";
const releaseWorkflowPath = path.resolve(
process.cwd(),
".gitea/workflows/release.yml",
);
describe("release workflow macOS bundle path", () => {
it("does not reference the legacy TFTSR.app bundle name", () => {
const workflow = readFileSync(releaseWorkflowPath, "utf-8");
expect(workflow).not.toContain("/bundle/macos/TFTSR.app");
});
it("resolves the macOS .app bundle dynamically", () => {
const workflow = readFileSync(releaseWorkflowPath, "utf-8");
expect(workflow).toContain("APP=$(find");
expect(workflow).toContain("-name \"*.app\"");
});
});