mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
chore(release): cut 2026.3.2
This commit is contained in:
@@ -1,20 +1,13 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { canonicalSparkleBuildFromVersion } from "../scripts/sparkle-build.ts";
|
||||
|
||||
const APPCAST_URL = new URL("../appcast.xml", import.meta.url);
|
||||
|
||||
function expectedSparkleVersion(shortVersion: string): string {
|
||||
const [year, month, day] = shortVersion.split(".");
|
||||
if (!year || !month || !day) {
|
||||
throw new Error(`unexpected short version: ${shortVersion}`);
|
||||
}
|
||||
return `${year}${month.padStart(2, "0")}${day.padStart(2, "0")}0`;
|
||||
}
|
||||
|
||||
describe("appcast.xml", () => {
|
||||
it("uses the expected Sparkle version for 2026.2.15", () => {
|
||||
it("uses the expected Sparkle version for 2026.3.1", () => {
|
||||
const appcast = readFileSync(APPCAST_URL, "utf8");
|
||||
const shortVersion = "2026.2.15";
|
||||
const shortVersion = "2026.3.1";
|
||||
const items = Array.from(appcast.matchAll(/<item>[\s\S]*?<\/item>/g)).map((match) => match[0]);
|
||||
const matchingItem = items.find((item) =>
|
||||
item.includes(`<sparkle:shortVersionString>${shortVersion}</sparkle:shortVersionString>`),
|
||||
@@ -22,6 +15,6 @@ describe("appcast.xml", () => {
|
||||
|
||||
expect(matchingItem).toBeDefined();
|
||||
const sparkleMatch = matchingItem?.match(/<sparkle:version>([^<]+)<\/sparkle:version>/);
|
||||
expect(sparkleMatch?.[1]).toBe(expectedSparkleVersion(shortVersion));
|
||||
expect(sparkleMatch?.[1]).toBe(String(canonicalSparkleBuildFromVersion(shortVersion)));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user