Compare commits

...

12 Commits

Author SHA1 Message Date
mnovak d38c3ce6f8 [repo] Release0.1.3: Note Aula's confirmation in the review 2026-12-02 23:40:06 +01:00
mnovak 4d3f790600 [repo] Release0.1.3: Aula lists the Windows installer 2026-12-02 23:39:55 +01:00
mnovak 3c0124b188 [repo] Release0.1.3: Merge the record of v0.1.3 (PR #15) 2026-12-02 23:37:46 +01:00
mnovak dc49209e17 [repo] Release0.1.3: The record of v0.1.3, the installer Aula can list, and why v0.1.2 does not exist 2026-12-02 23:37:28 +01:00
mnovak 56f266a5b9 [repo] Release: 0.1.3
Carries what v0.1.2 was made for, the Windows installer named RoseaDomi_0.1.3_x64-setup.exe (PR #13),
and the 30 s timeout that let the release's tests finish on the runner (PR #14). v0.1.2 was tagged but
never published: both of its runs stopped at the test step.
2026-12-02 22:57:20 +01:00
mnovak b947ac3723 [art-prep] BoardTest: Merge fix/board-test-timeout (PR #14) 2026-12-02 20:03:03 +01:00
mnovak 1cb1ffb8c8 [art-prep] BoardTest: The placeholder comparison gets 30 s, as it timed out at 5 s twice on the release runner 2026-12-02 19:59:31 +01:00
mnovak 666c78f5fe [repo] Release: 0.1.2 2026-12-02 17:57:36 +01:00
mnovak 6f1920e91b [tauri] InstallerName: Merge the installer published as RoseaDomi_<version>_x64-setup.exe (PR #13) 2026-12-02 15:33:19 +01:00
mnovak 578aa44f23 [tauri] InstallerName: Publish the Windows installer as RoseaDomi_<version>_x64-setup.exe, a name Aula and Atrium accept; productName stays Rosea Domi 2026-12-02 15:32:43 +01:00
mnovak 2b1ac99fbe [repo] Release0.1.1: Merge the record of the first release, v0.1.1 (PR #12) 2026-12-02 15:24:35 +01:00
mnovak eded64d36e [repo] Release0.1.1: v0.1.1 is published, signed with rosea-domi-android; G-F1 and G-F7 closed with the run's evidence 2026-12-02 15:24:21 +01:00
16 changed files with 275 additions and 12 deletions
+4 -2
View File
@@ -89,13 +89,15 @@ Svelte codebase, the apps through a Tauri 2 shell. Analysis:
| Id | Gap | Status / evidence | | Id | Gap | Status / evidence |
|:--|:--|:--| |:--|:--|:--|
| G-F1 | The first release is not published | **Decided by the author, 2026-11-25: publish** ("Yes, remove G6.1 from Rosea's CLAUDE.md and release Rosea v0.1.0, desktop and APK."). v0.1.0, desktop and APK, through Fabrica; closed when the hub's run publishes it. | | ~~G-F1~~ | ~~The first release is not published~~ | **Closed 2026-12-02:** v0.1.1 published by the hub's run `r59y647cfcpw9` (https://gitea.marek-novak.cz/mnovak/Rosea/releases/tag/v0.1.1): the installer (Authenticode, domi-code-signing), the APK (rosea-domi-android), a minisig for each and SHA256SUMS (domi-release), the notes and the Aula pictures. Mark decided to publish on 2026-11-25. v0.1.0 is a tag only: its runs were refused at preflight and nothing was published under it. |
| G-F2 | Canalis Part B: no capability is served | Open by decision (F6): no capability found that neither writes into her nor reads her; Canalis keys need Custos, which a player does not have. | | G-F2 | Canalis Part B: no capability is served | Open by decision (F6): no capability found that neither writes into her nor reads her; Canalis keys need Custos, which a player does not have. |
| G-F3 | No showcase videos | Open: Pensum `kkpy69`, once Fabrica docs/37 is on `main`. | | G-F3 | No showcase videos | Open: Pensum `kkpy69`, once Fabrica docs/37 is on `main`. |
| G-F4 | `domi-rosea://` not seen working | Open: the hook is tested as text; no installer was run on this PC (it writes the real registry). | | G-F4 | `domi-rosea://` not seen working | Open: the hook is tested as text; no installer was run on this PC (it writes the real registry). |
| ~~G-F5~~ | ~~The `phone` target has not run~~ | **Closed 2026-11-21:** `fabrica tests run --target phone` through the hub's queue, run `20261121-101158-uckm` 1 passed 0 failed on the Wave 10 (debug APK `bd59ff908125…`, commit f5d8d2c); the planted-fault drill `20261121-102500-crkf` failed as it must. The e2e pipeline's `phone` step still waits for the hub's e2e runner (Mark). Earlier: narrowed 2026-11-21 (`android-release-apk.md`): `reset: uninstall`, `maxMinutes: 20`, and the e2e pipeline's `phone` step (`device: Wave 10`) puts it in the hub's queue. **Still open:** the Wave 10 is not paired in Fabrica (`fabrica devices list`: *connected (not paired in Fabrica)*), so the step cannot get its phone; pairing is the Fabrica session's. | | ~~G-F5~~ | ~~The `phone` target has not run~~ | **Closed 2026-11-21:** `fabrica tests run --target phone` through the hub's queue, run `20261121-101158-uckm` 1 passed 0 failed on the Wave 10 (debug APK `bd59ff908125…`, commit f5d8d2c); the planted-fault drill `20261121-102500-crkf` failed as it must. The e2e pipeline's `phone` step still waits for the hub's e2e runner (Mark). Earlier: narrowed 2026-11-21 (`android-release-apk.md`): `reset: uninstall`, `maxMinutes: 20`, and the e2e pipeline's `phone` step (`device: Wave 10`) puts it in the hub's queue. **Still open:** the Wave 10 is not paired in Fabrica (`fabrica devices list`: *connected (not paired in Fabrica)*), so the step cannot get its phone; pairing is the Fabrica session's. |
| G-F7 | No key signs the APK | Open (`android-release-apk.md` A6): `rosea-domi-android` is not in Custos's `ANDROID_APPS`, so the release's `apk` step stops at `no_key`. Custos's change (or Mark's *Create Android key*), then the release. The unsigned release APK builds and verifies. **Narrowed 2026-11-22:** Custos 0.25.0's table still has no Rosea row. Its *Android grant* makes the key on a release's first signature, from the repo's own `release` pipeline (signing.rs test `the_android_grant_makes_an_apps_key…`). Per the Aula session, Custos 0.25.2 is installed and Mark gave the grant for `mnovak/*`. This is unverified until the first signature. **Answered 2026-12-02:** the key exists. Mark made it himself as `rosea-domi-android` and keeps that name; `sign-apk.ts`, its test and the `apk` step's `keys:` name it. Closed when a release APK is signed with it. | | ~~G-F7~~ | ~~No key signs the APK~~ | **Closed 2026-12-02:** Mark made `rosea-domi-android` in Custos (PR #11 named it in the code and the pipeline). The v0.1.1 run `r59y647cfcpw9` signed `rosea-domi-0.1.1-arm64.apk` with it, and its `apk` step passed (custos-sign verifies with apksig). This key is Rosea on Android for good. |
| G-F6 | PWA updates have no host | Open with G0.13: the service worker and *Refresh* are built; nothing serves the PWA. | | G-F6 | PWA updates have no host | Open with G0.13: the service worker and *Refresh* are built; nothing serves the PWA. |
| ~~G-F8~~ | ~~Aula does not list the Windows installer~~ | **Closed 2026-12-02:** Aula lists only `[A-Za-z0-9._-]+-setup.exe`, and v0.1.1's was `Rosea Domi_0.1.1_x64-setup.exe`. PR #13 renames it after `tauri build`; v0.1.3 (run `r9v6601at1pc5`) published `RoseaDomi_0.1.3_x64-setup.exe`, signed. Aula reported it live after a resync (29 projects, 0 problems): `/rosea/release/v0.1.3/RoseaDomi_0.1.3_x64-setup.exe` answers 200. |
| G-F9 | Notes lose an unpublished tag's changes | Open: `fabrica notes` counts from the highest earlier tag. `v0.1.2` was deleted for that reason (HANDOVER); `v0.1.0` still makes v0.1.1's notes omit PRs #8 and #9. Delete a tag whose release fails, or teach Fabrica to count from the last published release. |
## Atrium Domi — adoption (`atrium-adoption.md`) ## Atrium Domi — adoption (`atrium-adoption.md`)
+20
View File
@@ -0,0 +1,20 @@
# Review — `docs/release-0-1-3`
**What:** the record of v0.1.3: HANDOVER's latest section, plus GAP rows G-F8 (closed: Aula can list the installer)
and G-F9 (open: release notes lose an unpublished tag's changes).
## Findings
1. **Every claim names its evidence:** the run id `r9v6601at1pc5`, the published file names and sizes read from
the Gitea release, the desktop step's `installer:` log line, the published notes, and the SHA256SUMS lines.
2. **G-F9 is new, found while preparing v0.1.3:** the generated notes would have listed only PR #14. The v0.1.0
tag already did this to v0.1.1's notes. It stays open: the fix belongs in a habit (delete a tag whose release
fails) or in Fabrica, not in this repository.
3. **What I did not verify,** as stated in HANDOVER: the downloaded files against SHA256SUMS, and Aula showing the
installer.
4. **Soul, privacy, reachability, offline:** documents only.
**Gate:** lint:copy 29 files, 0 problems. No code changed, so no tests were rerun.
**Follow-up (`docs/aula-lists-installer`):** Aula reported the installer live (resync 29 projects, 0 problems;
the file answers 200). HANDOVER and G-F8 now say so, attributed to Aula. Not checked from here.
+34
View File
@@ -0,0 +1,34 @@
# Review — `fix/board-test-timeout`
**What:** the v0.1.2 release runs `r1ahwf1m23cdr` and `rm56nbzfchx5d` both stopped at the `test` step, on one
test: `art-prep` *art/placeholders/ holds exactly what the generator makes* timed out at vitest's default 5 s
(8.7 s in the first run, 5.4 s in the second). Every assertion that ran passed; the work was only slow. The test
reads the 169 SVG stand-ins in `art/placeholders/` and compares each with what the generator makes, while turbo
runs nine other suites on the same runner, in a checkout it has just fetched, so every file is read for the first
time. Run alone on D:, it takes 230 ms.
**How:** that one test gets `{ timeout: 30_000 }`, as `tools/release` already does for its slow suites
(`copy.test.ts` 60 s, `version.test.ts` 30 s), with a comment giving the measured times.
## Findings
1. **Is a longer timeout hiding a real slowdown?** No assertion changed. The test still fails when one stand-in
differs from the generator's output (drill below). 30 s is about three times the slowest time measured on the
runner. A test that takes that long would be a new finding.
2. **Why not a global `testTimeout`?** That would loosen every test in the package, including ones that should
stay fast. Only the test that reads files gets the longer limit.
3. **Why not just dispatch again?** That was tried: the second run failed on the same test. Under the runner's
load, the time sits around the limit, so a retry is a coin toss.
4. **The release:** tag `v0.1.2` points at `666c78f`, which does not have this fix. Nothing was signed or
published from either run. Which tag carries the release is the author's call (HANDOVER).
5. **Soul, privacy, reachability, offline:** a test file only. Nothing a player sees changed, and the bundle is
not rebuilt by this change.
**Test honesty:** with `app-icon-maskable.svg` changed (an attribute added), the test fails in 64 ms on the
content comparison (`expected '<svg data-drill="1"…' to be '<svg xmlns=…'`), not on time. The drill ran on D:
and was reverted.
**Gate (D:, 2026-12-02):** lint 0, typecheck 0, lint:copy 0 problems; `pnpm test` 653 passed (schema 19, identity 5,
release 8, cpu-guard 13, storage 70, content 88, art-prep 80, tauri 99, ui 92, engine 179).
**Not verified:** the test's time on the hub runner with this change. The next release run measures it.
+34
View File
@@ -0,0 +1,34 @@
# Review — `fix/installer-name`
**What:** the Windows installer is published as `RoseaDomi_<version>_x64-setup.exe`, not
`Rosea Domi_<version>_x64-setup.exe`. Aula makes an installer public only when its name matches
`[A-Za-z0-9._-]+-setup.exe` (Aula docs/14_feed.md), which is also the form Atrium Domi expects. So v0.1.1's
installer never appeared on Aula, while its APK did (reported by Aula, 2026-12-02).
**How:** `tauri build` still names the file after `productName`. Then `scripts/installer-name.ts` renames it,
in the same `build:desktop` command, before the release's `desktop` step collects `*-setup.exe`. The names and the
pattern live in `src/installer-name.ts`, where the test can reach them without a build.
## Findings
1. **Why not change `productName`?** It is also the window title, the install folder and the uninstall
entry Atrium finds her by. A new `productName` would make the next installer a second app beside the
first, and a player who updates would have two roses. Only the file is renamed. *Not done:* the
installer's own wizard text still says "Rosea Domi", which is right.
2. **An older installer left in the folder.** The release step publishes every `*-setup.exe` in
`bundle/nsis/`. The rename deletes any other installer there (build output only) and fails unless exactly
one remains with an accepted name. Tested with an old Tauri-named file and an old renamed one beside the
new one.
3. **The signing steps** (`sign`, `minisign`, `publish`) match `**/*-setup.exe`, so they find the renamed
file. *Not verified until the v0.1.2 hub run.*
4. **Test honesty:** with the space put back (`${PRODUCT_NAME}` unchanged), 4 of the 7 new tests fail
(drill run on D:, then reverted). The `build:desktop` order is pinned by a test, and `domi-app.test.ts` was
loosened only to allow what follows `tauri build`.
5. **AULA.md** names the new file, so a player following the page finds it.
6. **Soul, privacy, reachability, offline:** nothing a player sees inside the game changed.
**Not verified:** a real `tauri build` here (it is the hub's step), and Aula showing the installer once v0.1.2
is published.
**Gate (D:, 2026-12-02):** lint 0, typecheck 0, lint:copy 0 problems; `pnpm test` 653 passed (schema 19, identity 5,
release 8, cpu-guard 13, storage 70, content 88, art-prep 80, tauri 99, ui 92, engine 179).
+1 -1
View File
@@ -30,7 +30,7 @@ does not even ask for the permission to use the internet.
## Installing ## Installing
- **Windows:** run `Rosea Domi_<version>_x64-setup.exe`. It installs for you alone, with no - **Windows:** run `RoseaDomi_<version>_x64-setup.exe`. It installs for you alone, with no
administrator rights. administrator rights.
- **Android:** install the `.apk` (Android 7 or newer). Your phone will ask you to allow installing - **Android:** install the `.apk` (Android 7 or newer). Your phone will ask you to allow installing
apps from where you downloaded it. apps from where you downloaded it.
+47 -1
View File
@@ -2,7 +2,53 @@
Rewritten at the end of each session (CLAUDE.md §5.1). Rewritten at the end of each session (CLAUDE.md §5.1).
## Latest — 2026-11-23: @domi/ui, the shared look, and the credit ## Latest — 2026-12-02: v0.1.3, the installer Aula can list
- **Published:** https://gitea.marek-novak.cz/mnovak/Rosea/releases/tag/v0.1.3, by the hub's run `r9v6601at1pc5` at
`56f266a`.
- Windows: **`RoseaDomi_0.1.3_x64-setup.exe`**, with no space. Aula lists only `[A-Za-z0-9._-]+-setup.exe`, so
v0.1.1's `Rosea Domi_…` never appeared there. `tauri build` still names it after `productName`, then
`scripts/installer-name.ts` renames it in the same `build:desktop` (PR #13). `productName` stays "Rosea Domi": it is
also the window title, the install folder and the uninstall entry.
- Android: `rosea-domi-0.1.3-arm64.apk`, signed with `rosea-domi-android`. Minisigs and SHA256SUMS signed with
`domi-release`; the notes and the Aula pictures are attached.
- Mark's card: code 053 785 for `minisign`. `approve`, `sign` and `apk` raised none.
- **v0.1.2 does not exist.** It was tagged on `666c78f`, and both of its runs (`r1ahwf1m23cdr`, `rm56nbzfchx5d`)
stopped at `test`: art-prep's placeholder comparison timed out at 5 s on the runner (8.7 s, then 5.4 s; 230 ms run
alone). That test now has 30 s (PR #14). Mark chose v0.1.3 and had the `v0.1.2` tag deleted, because `fabrica notes`
counts from the highest earlier tag and would otherwise have left PR #13 out of the notes. **Lesson:** a tag that
is never published should be deleted, or the next release's notes lose its changes. `v0.1.0` still has this
problem: v0.1.1's notes omit PRs #8 and #9.
- **Aula lists it (reported by Aula, 2026-12-02):** after a resync (29 projects, 0 problems),
`/rosea/release/v0.1.3/RoseaDomi_0.1.3_x64-setup.exe` answers 200. Rosea's Windows download is live.
- **Not verified:** the published files against SHA256SUMS (only the list was read).
## Earlier — 2026-12-02: v0.1.1, the first release
- **Published:** https://gitea.marek-novak.cz/mnovak/Rosea/releases/tag/v0.1.1, by the hub's release run `r59y647cfcpw9` at `18b6c81`.
- Windows: `Rosea Domi_0.1.1_x64-setup.exe`, Authenticode with `domi-code-signing`.
- Android: `rosea-domi-0.1.1-arm64.apk`, signed with **`rosea-domi-android`**, Mark's key in Custos. It is Rosea on
Android for good: every later APK must be signed with it.
- Each file has a minisig, and SHA256SUMS is signed with `domi-release`. The notes and 9 Aula pictures are attached.
- Mark's cards: one code (932 135) covered `sign` and `minisign`. The `apk` step raised none.
- **How it got there:**
- G6.1 (the legal check of the look) was removed by Mark's own words on 2026-11-25 (PR #9).
- @domi/ui went in after its phone test on the Wave 10 through Fabrica's queue (PR #8; run `20261125-133208-trjl`).
- The `apk` step's preflight list first named a key that didn't exist (PR #10). Mark's key is
`rosea-domi-android` (PR #11).
- v0.1.0 is a tag on `8d7027c` only. Its runs (`r9j7b2sqmzdjg`, `rwyv2j3bazfv9`) were refused at preflight, and
nothing was published under it.
- **Dispatching:** the hub doesn't start a release on a tag push. Dispatch it with `POST /api/runs`
`{"repo":"mnovak/Rosea","pipeline":"release","ref":"vX.Y.Z"}`, with the token from
`custos-claude get fabrica-hub-token` held in a variable and never printed. Or use `fabrica deploy rosea`, which
bumps, tags and follows.
- **Still open:** the Aula page needs the server's `modules/aula.nix` to list Rosea (not this repository's). The PWA
has no host (G0.13). iOS needs a Mac (G-T1).
- **The 90 % rule (Mark, 2026-11-25):** no build or test while CPU or RAM is at 90 % or more. Drives: 90 % at first,
95 % for D:, E: and F: from 2026-12-02. Check first and wait. It is not in CLAUDE.md yet: that needs Mark's own yes
in this repository's session.
## Earlier — 2026-11-23: @domi/ui, the shared look, and the credit
- **`feature/domi-ui`**: Rosea's buttons and her town search wear @domi/ui v1.5.0 (CPAL-1.0). On Android the town field is an editable box, so no Autofill request goes to Google. - **`feature/domi-ui`**: Rosea's buttons and her town search wear @domi/ui v1.5.0 (CPAL-1.0). On Android the town field is an editable box, so no Autofill request goes to Google.
- It is vendored unchanged into `packages/domi-ui` by the design system's `tools/vendor.mjs`. - It is vendored unchanged into `packages/domi-ui` by the design system's `tools/vendor.mjs`.
+2 -2
View File
@@ -1,13 +1,13 @@
{ {
"name": "@rosea/tauri", "name": "@rosea/tauri",
"version": "0.1.1", "version": "0.1.3",
"private": true, "private": true,
"license": "CPAL-1.0", "license": "CPAL-1.0",
"type": "module", "type": "module",
"description": "The Tauri 2 shell: the Android, iOS and desktop apps around apps/rosea's built game (dist-tauri/). Imports no package.", "description": "The Tauri 2 shell: the Android, iOS and desktop apps around apps/rosea's built game (dist-tauri/). Imports no package.",
"scripts": { "scripts": {
"dev": "tsx scripts/icons.ts && tsx scripts/domi-app.ts && tauri dev", "dev": "tsx scripts/icons.ts && tsx scripts/domi-app.ts && tauri dev",
"build:desktop": "tsx scripts/icons.ts && tsx scripts/domi-app.ts && tauri build", "build:desktop": "tsx scripts/icons.ts && tsx scripts/domi-app.ts && tauri build && tsx scripts/installer-name.ts",
"build:android": "tsx scripts/android.ts prepare && tauri android build --debug --apk --target aarch64 && tsx scripts/android.ts verify", "build:android": "tsx scripts/android.ts prepare && tauri android build --debug --apk --target aarch64 && tsx scripts/android.ts verify",
"build:android-release": "tsx scripts/android.ts prepare && tauri android build --apk --target aarch64 && tsx scripts/android.ts verify src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release-unsigned.apk", "build:android-release": "tsx scripts/android.ts prepare && tauri android build --apk --target aarch64 && tsx scripts/android.ts verify src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release-unsigned.apk",
"sign:apk": "tsx scripts/sign-apk.ts", "sign:apk": "tsx scripts/sign-apk.ts",
@@ -0,0 +1,38 @@
/**
* After `tauri build`: renames the NSIS installer to its published name (src/installer-name.ts), so
* the release step's `*-setup.exe` finds one file, and its name has no space.
*
* tsx scripts/installer-name.ts in src-tauri/target/release/bundle/nsis/
*/
import { existsSync, readdirSync, renameSync, rmSync } from 'node:fs';
import { join, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { INSTALLER_PATTERN, installerName, tauriInstallerName } from '../src/installer-name.js';
import { gameVersion } from './domi-app.js';
import { SRC_TAURI } from './tauri.js';
/**
* Renames the version's installer in `dir` and removes any other installer there (an older build's,
* which the release's `*-setup.exe` would otherwise publish too). Returns the new path. Fails if the
* built file is missing, or if anything but the one accepted installer is left.
*/
export function renameInstaller(dir: string, version: string): string {
const from = join(dir, tauriInstallerName(version));
const name = installerName(version);
const to = join(dir, name);
if (!existsSync(from)) throw new Error(`no installer to rename: ${from}`);
for (const f of readdirSync(dir)) {
if (f.endsWith('-setup.exe') && f !== tauriInstallerName(version)) rmSync(join(dir, f));
}
renameSync(from, to);
const left = readdirSync(dir).filter((f) => f.endsWith('-setup.exe'));
if (left.length !== 1 || left[0] !== name || !INSTALLER_PATTERN.test(name)) {
throw new Error(`expected only ${name}, found: ${left.join(', ')}`);
}
return to;
}
if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
const to = renameInstaller(join(SRC_TAURI, 'target', 'release', 'bundle', 'nsis'), gameVersion());
console.log(`installer: ${to}`);
}
+1 -1
View File
@@ -2614,7 +2614,7 @@ dependencies = [
[[package]] [[package]]
name = "rosea-shell" name = "rosea-shell"
version = "0.1.1" version = "0.1.3"
dependencies = [ dependencies = [
"tauri", "tauri",
"tauri-build", "tauri-build",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "rosea-shell" name = "rosea-shell"
version = "0.1.1" version = "0.1.3"
license = "CPAL-1.0" license = "CPAL-1.0"
description = "The Tauri 2 shell of Rosea Domi: a window around the built game, and nothing else." description = "The Tauri 2 shell of Rosea Domi: a window around the built game, and nothing else."
edition = "2024" edition = "2024"
+25
View File
@@ -0,0 +1,25 @@
/**
* The Windows installer's published file name. Tauri's NSIS bundler names it after `productName`
* (`Rosea Domi_<version>_x64-setup.exe`), and the space keeps it off Aula: Aula makes an installer
* public only when its name matches `[A-Za-z0-9._-]+-setup.exe` (Aula docs/14_feed.md), the
* `<Name>_<version>_x64-setup.exe` form Atrium Domi expects as well.
*
* Only the file is renamed after the build. `productName` stays "Rosea Domi": it is also the window
* title, the install folder and the uninstall entry Atrium finds her by, and changing it would make
* the next installer a second app beside the first.
*/
import { PRODUCT_NAME } from '../../../packages/schema/src/constants.js';
/** What Aula and Atrium accept as an installer's name. */
export const INSTALLER_PATTERN = /^[A-Za-z0-9._-]+-setup\.exe$/;
/** Tauri's own name for the installer of a version. */
export const tauriInstallerName = (version: string): string => `${PRODUCT_NAME}_${version}_x64-setup.exe`;
/** The published name: the product name without spaces, e.g. `RoseaDomi_0.1.2_x64-setup.exe`. */
export function installerName(version: string): string {
if (!/^\d+\.\d+\.\d+$/.test(version)) throw new Error(`not a version: ${version}`);
const name = `${PRODUCT_NAME.replace(/\s+/g, '')}_${version}_x64-setup.exe`;
if (!INSTALLER_PATTERN.test(name)) throw new Error(`the installer's name would not be accepted: ${name}`);
return name;
}
+1 -1
View File
@@ -51,7 +51,7 @@ describe('domi-app.toml', () => {
it('is made before every desktop build and never committed', () => { it('is made before every desktop build and never committed', () => {
const pkg = JSON.parse(readFileSync(join(HERE, '..', 'package.json'), 'utf8')) as { scripts: Record<string, string> }; const pkg = JSON.parse(readFileSync(join(HERE, '..', 'package.json'), 'utf8')) as { scripts: Record<string, string> };
expect(pkg.scripts['build:desktop']).toMatch(/tsx scripts\/domi-app\.ts && tauri build$/); expect(pkg.scripts['build:desktop']).toMatch(/tsx scripts\/domi-app\.ts && tauri build( |$)/);
expect(pkg.scripts['dev']).toContain('tsx scripts/domi-app.ts'); expect(pkg.scripts['dev']).toContain('tsx scripts/domi-app.ts');
const ignore = readFileSync(join(HERE, '..', '..', '..', '.gitignore'), 'utf8'); const ignore = readFileSync(join(HERE, '..', '..', '..', '.gitignore'), 'utf8');
expect(ignore).toContain('apps/rosea-tauri/src-tauri/atrium/'); expect(ignore).toContain('apps/rosea-tauri/src-tauri/atrium/');
@@ -0,0 +1,63 @@
import { mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
import { tmpdir } from 'node:os';
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
import { afterEach, describe, expect, it } from 'vitest';
import { renameInstaller } from '../scripts/installer-name.js';
import { INSTALLER_PATTERN, installerName, tauriInstallerName } from '../src/installer-name.js';
describe('installerName', () => {
it('has no space, and matches what Aula and Atrium accept', () => {
expect(installerName('0.1.2')).toBe('RoseaDomi_0.1.2_x64-setup.exe');
expect(installerName('0.1.2')).toMatch(INSTALLER_PATTERN);
expect(installerName('12.0.31')).toMatch(INSTALLER_PATTERN);
});
it("knows Tauri's own name has a space, which Aula refuses", () => {
expect(tauriInstallerName('0.1.2')).toBe('Rosea Domi_0.1.2_x64-setup.exe');
expect(tauriInstallerName('0.1.2')).not.toMatch(INSTALLER_PATTERN);
});
it('refuses something that is not a version', () => {
expect(() => installerName('0.1')).toThrow(/not a version/);
expect(() => installerName('0.1.2 x')).toThrow(/not a version/);
});
});
describe('the desktop build', () => {
it('renames the installer right after tauri build, so the release never sees the name with a space', () => {
const pkg = JSON.parse(readFileSync(join(dirname(fileURLToPath(import.meta.url)), '..', 'package.json'), 'utf8')) as { scripts: Record<string, string> };
expect(pkg.scripts['build:desktop']).toMatch(/&& tauri build && tsx scripts\/installer-name\.ts$/);
});
});
describe('renameInstaller', () => {
let dir = '';
afterEach(() => {
if (dir) rmSync(dir, { recursive: true, force: true });
dir = '';
});
it("renames the built installer, and leaves only names Aula accepts", () => {
dir = mkdtempSync(join(tmpdir(), 'rosea-nsis-'));
writeFileSync(join(dir, 'Rosea Domi_0.1.2_x64-setup.exe'), 'exe');
const to = renameInstaller(dir, '0.1.2');
expect(to).toBe(join(dir, 'RoseaDomi_0.1.2_x64-setup.exe'));
expect(readdirSync(dir)).toEqual(['RoseaDomi_0.1.2_x64-setup.exe']);
});
it('fails when the build left no installer', () => {
dir = mkdtempSync(join(tmpdir(), 'rosea-nsis-'));
expect(() => renameInstaller(dir, '0.1.2')).toThrow(/no installer to rename/);
});
it("removes an older build's installers, so the release publishes only this one", () => {
dir = mkdtempSync(join(tmpdir(), 'rosea-nsis-'));
writeFileSync(join(dir, 'Rosea Domi_0.1.2_x64-setup.exe'), 'exe');
writeFileSync(join(dir, 'Rosea Domi_0.1.1_x64-setup.exe'), 'old');
writeFileSync(join(dir, 'RoseaDomi_0.1.1_x64-setup.exe'), 'old');
writeFileSync(join(dir, 'notes.txt'), 'kept');
renameInstaller(dir, '0.1.2');
expect(readdirSync(dir).sort()).toEqual(['RoseaDomi_0.1.2_x64-setup.exe', 'notes.txt']);
});
});
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@rosea/app", "name": "@rosea/app",
"version": "0.1.1", "version": "0.1.3",
"private": true, "private": true,
"license": "CPAL-1.0", "license": "CPAL-1.0",
"type": "module", "type": "module",
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "rosea", "name": "rosea",
"private": true, "private": true,
"license": "CPAL-1.0", "license": "CPAL-1.0",
"version": "0.1.1", "version": "0.1.3",
"type": "module", "type": "module",
"packageManager": "pnpm@9.12.3", "packageManager": "pnpm@9.12.3",
"engines": { "engines": {
+2 -1
View File
@@ -67,7 +67,8 @@ describe('the stand-ins', () => {
} }
}); });
it('art/placeholders/ holds exactly what the generator makes (run pnpm art:board after changing the manifest)', () => { // 169 files read and compared one by one: 5.4 s and 8.7 s on the release runner, beside nine other suites.
it('art/placeholders/ holds exactly what the generator makes (run pnpm art:board after changing the manifest)', { timeout: 30_000 }, () => {
const dir = `${root}art/placeholders/`; const dir = `${root}art/placeholders/`;
const files = readdirSync(dir).filter((f) => f.endsWith('.svg')); const files = readdirSync(dir).filter((f) => f.endsWith('.svg'));
expect(files.map((f) => f.slice(0, -4)).sort()).toEqual([...stand.keys()].sort()); expect(files.map((f) => f.slice(0, -4)).sort()).toEqual([...stand.keys()].sort());