mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
fix(release): enforce lane floor for calver appcast entries
This commit is contained in:
28
test/release-check.test.ts
Normal file
28
test/release-check.test.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { collectAppcastSparkleVersionErrors } from "../scripts/release-check.ts";
|
||||
|
||||
function makeItem(shortVersion: string, sparkleVersion: string): string {
|
||||
return `<item><title>${shortVersion}</title><sparkle:shortVersionString>${shortVersion}</sparkle:shortVersionString><sparkle:version>${sparkleVersion}</sparkle:version></item>`;
|
||||
}
|
||||
|
||||
describe("collectAppcastSparkleVersionErrors", () => {
|
||||
it("accepts legacy 9-digit calver builds before lane-floor cutover", () => {
|
||||
const xml = `<rss><channel>${makeItem("2026.2.26", "202602260")}</channel></rss>`;
|
||||
|
||||
expect(collectAppcastSparkleVersionErrors(xml)).toEqual([]);
|
||||
});
|
||||
|
||||
it("requires lane-floor builds on and after lane-floor cutover", () => {
|
||||
const xml = `<rss><channel>${makeItem("2026.2.27", "202602270")}</channel></rss>`;
|
||||
|
||||
expect(collectAppcastSparkleVersionErrors(xml)).toEqual([
|
||||
"appcast item '2026.2.27' has sparkle:version 202602270 below lane floor 2026022790.",
|
||||
]);
|
||||
});
|
||||
|
||||
it("accepts canonical stable lane builds on and after lane-floor cutover", () => {
|
||||
const xml = `<rss><channel>${makeItem("2026.2.27", "2026022790")}</channel></rss>`;
|
||||
|
||||
expect(collectAppcastSparkleVersionErrors(xml)).toEqual([]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user