Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ The About screen derives its visible OTA version from the announcement mapped to

For later OTAs on the same native build, increment the OTA sequence (`ota.2`, `ota.3`, and so on), add the matching announcement mapping, and update the release validation guard. Do not reuse a release key for different bundle contents.

The displayed version can be any bump, not just a patch. 1.15.0 ships as a live update on the 1.14.1 build 30 binary: channel `production-30`, release key `live:1.14.1-ota.2`. `live:1.14.1-ota.1` stays mapped to the 1.14.1 announcement. The next store release must use a version above 1.15.0 so the displayed version never goes backwards.

### Pushing a Live Update

```bash
Expand Down
12 changes: 12 additions & 0 deletions src/__tests__/unit/lib/whatsNew.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,18 @@ describe("whatsNew", () => {
);
});

it("should show the second 1.14.1 live update as 1.15.0", () => {
const announcement = getWhatsNewAnnouncement("live:1.14.1-ota.2");

expect(announcement?.id).toBe("release-1.15.0");
expect(getReleaseDisplayVersion("live:1.14.1-ota.2", "1.14.1")).toBe(
"1.15.0",
);
expect(getWhatsNewAnnouncement("native:1.14.1+30")?.id).toBe(
"release-1.14.1",
);
});

it("should preserve the native version without a mapped release key", () => {
expect(getReleaseDisplayVersion(undefined, "1.14.1")).toBe("1.14.1");
expect(getReleaseDisplayVersion("live:unknown", "1.14.1")).toBe("1.14.1");
Expand Down
12 changes: 12 additions & 0 deletions src/__tests__/validation/release-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,16 @@ describe("release configuration", () => {
),
).toBe(true);
});

it("should map the current live update and never reuse a release key", () => {
const releaseKeys = WHATS_NEW_ANNOUNCEMENTS.flatMap(
(announcement) => announcement.releaseKeys,
);
const currentLiveUpdate = WHATS_NEW_ANNOUNCEMENTS.find((announcement) =>
announcement.releaseKeys.includes("live:1.14.1-ota.2"),
);

expect(new Set(releaseKeys).size).toBe(releaseKeys.length);
expect(currentLiveUpdate?.version).toBe("1.15.0");
});
});
15 changes: 15 additions & 0 deletions src/lib/whatsNew.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@ export type WhatsNewAnnouncement = {
};

export const WHATS_NEW_ANNOUNCEMENTS: WhatsNewAnnouncement[] = [
{
// Live update on the 1.14.1 build 30 binary, displayed as 1.15.0.
id: "release-1.15.0",
version: "1.15.0",
releaseKeys: ["live:1.14.1-ota.2"],
title: "What's new in v1.15.0",
items: [
"Mark media as Liked, Disliked, or Play Later, and find them in new Library collections.",
"Favorite, like, dislike, or save what's playing for later, right from Now Playing.",
"Build decks of games and cards, then reorder them, play them as a playlist, write them to a tag, or share a link.",
"Manage a linked device's Zaparoo Online settings without signing in, including library sync, remote control, and unlinking.",
"Get clearer messages when pairing is rate limited.",
"Decks, likes, Play Later, and library sync need Zaparoo Core 2.18 or newer.",
],
},
{
// iOS and French Android users skipped 1.13.0, so its items are repeated.
id: "release-1.14.1",
Expand Down
Loading