mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-14 08:46:07 +00:00
* feat: sidebar update card (web + macOS) with app-first mac update flow and Sparkle beta track Squashed from claude/update-notification-display-c6cfb9 after semantic merge with #104178 (channel-aware CLI installs). See PR #104171 body for details. * chore(i18n): resync generated inventories after rebase * chore(i18n): resync locale metadata after rebase
34 lines
1.3 KiB
TypeScript
34 lines
1.3 KiB
TypeScript
// Make Appcast tests cover release appcast script behavior.
|
|
import { readFileSync } from "node:fs";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
const scriptPath = "scripts/make_appcast.sh";
|
|
|
|
describe("make_appcast cleanup", () => {
|
|
it("does not reference release notes before their path is assigned", () => {
|
|
const script = readFileSync(scriptPath, "utf8");
|
|
const setupBlock = script.slice(
|
|
script.indexOf('TMP_DIR="$(mktemp -d)"'),
|
|
script.indexOf('cp -f "$ZIP" "$TMP_DIR/$ZIP_NAME"'),
|
|
);
|
|
|
|
expect(setupBlock).toContain('NOTES_HTML=""');
|
|
expect(setupBlock.indexOf('NOTES_HTML=""')).toBeLessThan(
|
|
setupBlock.indexOf("trap cleanup EXIT"),
|
|
);
|
|
expect(setupBlock).toContain(
|
|
'if [[ -n "$NOTES_HTML" && "${KEEP_SPARKLE_NOTES:-0}" != "1" ]]; then',
|
|
);
|
|
expect(setupBlock).toContain('rm -f "$NOTES_HTML"');
|
|
});
|
|
|
|
it("adds the beta channel and refuses alpha releases", () => {
|
|
const script = readFileSync(scriptPath, "utf8");
|
|
|
|
expect(script).toContain('if [[ "$VERSION" == *-beta.* || "$VERSION" == *.beta.* ]]; then');
|
|
expect(script).toContain("CHANNEL_ARGS=(--channel beta)");
|
|
expect(script).toContain('if [[ "$VERSION" == *-alpha.* || "$VERSION" == *.alpha.* ]]; then');
|
|
expect(script).toContain('"${CHANNEL_ARGS[@]}"');
|
|
});
|
|
});
|