Publish updates to the released public game
This commit is contained in:
parent
8b798b4a9f
commit
ab76cb1273
5 changed files with 14 additions and 17 deletions
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
## BGS publication
|
## BGS publication
|
||||||
|
|
||||||
- Slug `puerto-rico`, version **1** stays **private** (`public: false`), with **Unlisted off** and all BGS locales supported. Making it public needs an explicit request.
|
- Slug `puerto-rico`, version **1** has been released publicly (`public: true`), with **Unlisted off** and all BGS locales supported. Preserve its public status when publishing updates.
|
||||||
- Use `pnpm publish:private`; see [README](README.md#private-bgs-publication). It packages, uploads and verifies the engine/viewer and metadata. Admin credentials come from `~/.bgs`; never print or commit the token.
|
- Use `pnpm publish:bgs`; see [README](README.md#bgs-publication). It packages, uploads and verifies the engine/viewer and metadata. Admin credentials come from `~/.bgs`; never print or commit the token.
|
||||||
- Bump the package version for engine changes. Ship `dist/engine.js` and the self-contained `dist/viewer.js` (global `puertorico`), never the local sandbox. Do not register tutorial metadata until playable BGS tutorials exist.
|
- Bump the package version for engine changes. Ship `dist/engine.js` and the self-contained `dist/viewer.js` (global `puertorico`), never the local sandbox. Do not register tutorial metadata until playable BGS tutorials exist.
|
||||||
- Source repositories are public on Codeberg (`origin`) and GitHub (`github`); push commits to both. Git delivery and BGS publication are separate.
|
- Source repositories are public on Codeberg (`origin`) and GitHub (`github`); push commits to both. Git delivery and BGS publication are separate.
|
||||||
|
|
||||||
|
|
|
||||||
10
README.md
10
README.md
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
[Play now at boardgamers.space](https://boardgamers.space/boardgame/puerto-rico)
|
[Play now at boardgamers.space](https://boardgamers.space/boardgame/puerto-rico)
|
||||||
|
|
||||||
Implementation for Boardgamers Space, targeting **Puerto Rico 1897: Special Edition** and the official June 2026 errata. Version 1 is published as a **private beta** on [BGS](https://boardgamers.space/boardgame/puerto-rico), with Unlisted disabled. The engine package is `@boardgamers/puerto-rico@0.3.0`. The viewer follows the global BGS language preference.
|
Implementation for Boardgamers Space, targeting **Puerto Rico 1897: Special Edition** and the official June 2026 errata. Version 1 is published as a **public release** on [BGS](https://boardgamers.space/boardgame/puerto-rico), with Unlisted disabled. The engine package is `@boardgamers/puerto-rico@0.3.5`. The viewer follows the global BGS language preference.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pnpm install
|
pnpm install
|
||||||
|
|
@ -56,11 +56,11 @@ pnpm build # dist/engine.js, dist/viewer.js, local sandbox
|
||||||
pnpm test:browser # 320/390/768/1440px, real viewer events, chat/journal scrolling
|
pnpm test:browser # 320/390/768/1440px, real viewer events, chat/journal scrolling
|
||||||
```
|
```
|
||||||
|
|
||||||
This private version still needs broader playtesting. The Festival marker interpretation is noted above. Original vector UI artwork is in `viewer/icons.js`; reference scans in `.local/` are ignored and never bundled.
|
Further playtesting remains welcome. The Festival marker interpretation is noted above. Original vector UI artwork is in `viewer/icons.js`; reference scans in `.local/` are ignored and never bundled.
|
||||||
|
|
||||||
## Private BGS publication
|
## BGS publication
|
||||||
|
|
||||||
`pnpm publish:private` builds the bundles, packages only the self-contained engine and its manifest, checks complete 1–5-player games from the extracted package, and uploads the engine/viewer to BGS. The script reads the admin token from `~/.bgs` without logging it, preserves the existing game/request identity, refuses to replace a public version, and verifies the private/listed flags and CDN bytes. It grants beta access to `coyotte508` if needed. Metadata snapshots and package artifacts stay in ignored `.local/release/`.
|
`pnpm publish:bgs` builds the bundles, packages only the self-contained engine and its manifest, checks complete 1–5-player games from the extracted package, and uploads the engine/viewer to BGS. The script reads the admin token from `~/.bgs` without logging it, preserves the existing game/request identity, requires an already public version, and verifies the public/listed flags and CDN bytes. Metadata snapshots and package artifacts stay in ignored `.local/release/`.
|
||||||
|
|
||||||
The hosted bundle has no local preview controls or runtime asset dependencies. Global BGS locale and color-blind preferences are handled by the viewer; expansion switches remain internal. Four playable tutorial chapters are registered.
|
The hosted bundle has no local preview controls or runtime asset dependencies. Global BGS locale and color-blind preferences are handled by the viewer; expansion switches remain internal. Four playable tutorial chapters are registered.
|
||||||
|
|
||||||
|
|
@ -100,5 +100,5 @@ After `pnpm build`, open `/tutorial.html?chapter=basics&locale=fr` on the local
|
||||||
preview server (or replace the chapter ID above). `pnpm test` covers legality,
|
preview server (or replace the chapter ID above). `pnpm test` covers legality,
|
||||||
conservation, replay, progress and translation completeness. `pnpm test:tutorials`
|
conservation, replay, progress and translation completeness. `pnpm test:tutorials`
|
||||||
plays every chapter through the actual controls on mobile and desktop and checks
|
plays every chapter through the actual controls on mobile and desktop and checks
|
||||||
all languages at 320 px. `pnpm publish:private` registers the chapter metadata with
|
all languages at 320 px. `pnpm publish:bgs` registers the chapter metadata with
|
||||||
the viewer; translated BGS chapter-list labels use the platform metadata service.
|
the viewer; translated BGS chapter-list labels use the platform metadata service.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"label": "🏝️ Puerto Rico",
|
"label": "🏝️ Puerto Rico",
|
||||||
"public": false,
|
"public": true,
|
||||||
"players": [1, 2, 3, 4, 5],
|
"players": [1, 2, 3, 4, 5],
|
||||||
"description": "Choose roles to develop your island, produce goods, and ship them for victory points. Every role helps your rivals too, so timing matters as much as building a strong economy. This adaptation of Puerto Rico 1897: Special Edition includes all six expansions and solo play against two Puertomas.",
|
"description": "Choose roles to develop your island, produce goods, and ship them for victory points. Every role helps your rivals too, so timing matters as much as building a strong economy. This adaptation of Puerto Rico 1897: Special Edition includes all six expansions and solo play against two Puertomas.",
|
||||||
"rules": "[How to play](/page/puerto-rico/rules)",
|
"rules": "[How to play](/page/puerto-rico/rules)",
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
"build": "node scripts/build.mjs",
|
"build": "node scripts/build.mjs",
|
||||||
"dev": "node scripts/dev.mjs",
|
"dev": "node scripts/dev.mjs",
|
||||||
"test:browser": "node test/browser.mjs && node test/locales-browser.mjs",
|
"test:browser": "node test/browser.mjs && node test/locales-browser.mjs",
|
||||||
"publish:private": "pnpm build && node scripts/publish-private.mjs",
|
"publish:bgs": "pnpm build && node scripts/publish-release.mjs",
|
||||||
"publish:metadata": "node scripts/publish-metadata.mjs",
|
"publish:metadata": "node scripts/publish-metadata.mjs",
|
||||||
"test:tutorials": "node test/tutorial-browser.mjs",
|
"test:tutorials": "node test/tutorial-browser.mjs",
|
||||||
"release:gallery": "pnpm build && node scripts/release-gallery.mjs",
|
"release:gallery": "pnpm build && node scripts/release-gallery.mjs",
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import { supportedLocales } from "../viewer/i18n.js";
|
||||||
import { packageEngine } from "./package-engine.mjs";
|
import { packageEngine } from "./package-engine.mjs";
|
||||||
|
|
||||||
const defaults = JSON.parse(await readFile("bgs/game.json", "utf8"));
|
const defaults = JSON.parse(await readFile("bgs/game.json", "utf8"));
|
||||||
assert.equal(defaults.public, false);
|
assert.equal(defaults.public, true);
|
||||||
const { tarball, version } = await packageEngine();
|
const { tarball, version } = await packageEngine();
|
||||||
const token = (await readFile(`${homedir()}/.bgs`, "utf8")).trim();
|
const token = (await readFile(`${homedir()}/.bgs`, "utf8")).trim();
|
||||||
const base = "https://admin.boardgamers.space/api/admin/gameinfo/puerto-rico";
|
const base = "https://admin.boardgamers.space/api/admin/gameinfo/puerto-rico";
|
||||||
|
|
@ -42,8 +42,8 @@ async function api(
|
||||||
}
|
}
|
||||||
const versions = await api("/versions");
|
const versions = await api("/versions");
|
||||||
const existing = versions.some((v) => v.version === 1) ? await api("/1") : null;
|
const existing = versions.some((v) => v.version === 1) ? await api("/1") : null;
|
||||||
if (existing?.public)
|
if (!existing?.public)
|
||||||
throw Error("The private publisher cannot replace a public version.");
|
throw Error("The release publisher requires an already public version.");
|
||||||
await mkdir(".local/release", { recursive: true });
|
await mkdir(".local/release", { recursive: true });
|
||||||
await writeFile(
|
await writeFile(
|
||||||
`.local/release/before-${Date.now()}.json`,
|
`.local/release/before-${Date.now()}.json`,
|
||||||
|
|
@ -71,7 +71,7 @@ await api("/1", "PUT", {
|
||||||
engine: { ...engine.engine, entryPoint: "dist/engine.js" },
|
engine: { ...engine.engine, entryPoint: "dist/engine.js" },
|
||||||
viewer: { ...defaults.viewer, url: uploaded.url, scriptBytes: bytes.length },
|
viewer: { ...defaults.viewer, url: uploaded.url, scriptBytes: bytes.length },
|
||||||
});
|
});
|
||||||
// Listed in the beta catalog; the actual playable version stays private.
|
// Keep the released game listed in the catalog.
|
||||||
const { metadata } = await releaseMetadata();
|
const { metadata } = await releaseMetadata();
|
||||||
await publishCmsRules(token);
|
await publishCmsRules(token);
|
||||||
await api("/meta", "PUT", metadata);
|
await api("/meta", "PUT", metadata);
|
||||||
|
|
@ -85,12 +85,9 @@ await api(
|
||||||
await api("/icon", "PUT", { mode: "pictogram" });
|
await api("/icon", "PUT", { mode: "pictogram" });
|
||||||
await translatePlatformMetadata(token, metadata);
|
await translatePlatformMetadata(token, metadata);
|
||||||
const translationsPending = false;
|
const translationsPending = false;
|
||||||
const access = await api("/beta-users");
|
|
||||||
if (!access.some((u) => u.username === "coyotte508"))
|
|
||||||
await api("/beta-users", "POST", { usernameOrEmail: "coyotte508" });
|
|
||||||
const published = await api("/1"),
|
const published = await api("/1"),
|
||||||
meta = await api("/meta");
|
meta = await api("/meta");
|
||||||
assert.equal(published.public, false);
|
assert.equal(published.public, true);
|
||||||
assert.deepEqual(published.players, defaults.players);
|
assert.deepEqual(published.players, defaults.players);
|
||||||
assert.ok(!meta.unlisted);
|
assert.ok(!meta.unlisted);
|
||||||
assert.equal(published.engine.package.version, version);
|
assert.equal(published.engine.package.version, version);
|
||||||
Loading…
Add table
Add a link
Reference in a new issue