2026-04-04 21:28:01 +00:00
|
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
|
import { readFileSync } from "node:fs";
|
|
|
|
|
import path from "node:path";
|
|
|
|
|
|
2026-04-05 02:34:15 +00:00
|
|
|
const autoTagWorkflowPath = path.resolve(
|
2026-04-04 21:28:01 +00:00
|
|
|
process.cwd(),
|
2026-04-05 02:34:15 +00:00
|
|
|
".gitea/workflows/auto-tag.yml",
|
2026-04-04 21:28:01 +00:00
|
|
|
);
|
|
|
|
|
|
2026-04-05 02:34:15 +00:00
|
|
|
describe("auto-tag release macOS bundle path", () => {
|
2026-04-04 21:28:01 +00:00
|
|
|
it("does not reference the legacy TFTSR.app bundle name", () => {
|
2026-04-05 02:34:15 +00:00
|
|
|
const workflow = readFileSync(autoTagWorkflowPath, "utf-8");
|
2026-04-04 21:28:01 +00:00
|
|
|
|
|
|
|
|
expect(workflow).not.toContain("/bundle/macos/TFTSR.app");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it("resolves the macOS .app bundle dynamically", () => {
|
2026-04-05 02:34:15 +00:00
|
|
|
const workflow = readFileSync(autoTagWorkflowPath, "utf-8");
|
2026-04-04 21:28:01 +00:00
|
|
|
|
|
|
|
|
expect(workflow).toContain("APP=$(find");
|
|
|
|
|
expect(workflow).toContain("-name \"*.app\"");
|
|
|
|
|
});
|
|
|
|
|
});
|