docs(readme): point downloads, badge and release section to Forgejo (#523) #527

Merged
maximus merged 3 commits from issue-523-readme-forgejo into main 2026-11-04 01:16:48 +00:00
3 changed files with 178 additions and 20 deletions

View file

@ -1,8 +1,8 @@
# Simpl'Résultat
Application de bureau 100 % locale pour importer, catégoriser et analyser vos transactions financières personnelles ou d'entreprise. Aucune donnée ne quitte votre ordinateur.
Application de bureau pour importer, catégoriser et analyser vos transactions financières personnelles ou d'entreprise. Vos données restent sur votre ordinateur, et l'application fonctionne sans connexion : d'elle-même, elle ne contacte que le serveur de licences, et seulement si une clé est enregistrée ; les mises à jour, la connexion au compte Maximus, la rétroaction et les cours du marché ne partent qu'à votre demande.
![Version](https://img.shields.io/github/v/release/Le-King-Fu/simpl-resultat?label=version)
![Version](https://img.shields.io/gitea/v/release/maximus/simpl-resultat?gitea_url=https%3A%2F%2Fgit.lacompagniemaximus.com&label=version)
![Windows](https://img.shields.io/badge/plateforme-Windows-blue)
![Linux](https://img.shields.io/badge/plateforme-Linux-orange)
@ -24,24 +24,24 @@ Application de bureau 100 % locale pour importer, catégoriser et analyser vos t
- **Guide utilisateur intégré** — Documentation complète accessible depuis les paramètres, imprimable en PDF
- **Mise à jour automatique** — Notifications et installation des nouvelles versions depuis l'application
Certaines fonctionnalités demandent la licence Base : voir le tableau des éditions sur la [page produit](https://lacompagniemaximus.com/fr/produits/simpl-resultat).
## Installation
### Windows
1. Rendez-vous sur la page [**Releases**](https://github.com/Le-King-Fu/simpl-resultat/releases/latest)
2. Téléchargez le fichier `.exe` (installateur NSIS)
3. Lancez le fichier téléchargé
1. Téléchargez l'installateur `.exe` depuis la [page produit](https://lacompagniemaximus.com/fr/produits/simpl-resultat) ou depuis la [dernière release](https://git.lacompagniemaximus.com/maximus/simpl-resultat/releases/latest)
2. Lancez le fichier téléchargé
> **Note :** Windows SmartScreen peut afficher un avertissement car l'application n'est pas signée numériquement.
> Cliquez sur **« Informations complémentaires »** puis **« Exécuter quand même »** pour continuer.
### Linux
1. Rendez-vous sur la page [**Releases**](https://github.com/Le-King-Fu/simpl-resultat/releases/latest)
2. Téléchargez le paquet adapté à votre distribution :
- `.deb` pour Debian / Ubuntu
- `.rpm` pour Fedora / openSUSE
3. Installez le paquet
1. Téléchargez le paquet adapté à votre distribution :
- `.deb` pour Debian / Ubuntu, depuis la [page produit](https://lacompagniemaximus.com/fr/produits/simpl-resultat) ou la [dernière release](https://git.lacompagniemaximus.com/maximus/simpl-resultat/releases/latest)
- `.rpm` pour Fedora / openSUSE, depuis la [dernière release](https://git.lacompagniemaximus.com/maximus/simpl-resultat/releases/latest)
2. Installez le paquet
## Démarrage rapide
@ -126,16 +126,7 @@ Les installateurs sont générés dans `src-tauri/target/release/bundle/`.
## Publier une nouvelle version
1. Mettez à jour la version dans `src-tauri/tauri.conf.json` et `package.json`
2. Committez les changements
3. Créez et poussez un tag :
```bash
git tag v0.3.7
git push origin v0.3.7
```
Le workflow GitHub Actions compile automatiquement l'application pour Windows et Linux, puis publie les installateurs dans une nouvelle Release.
Les versions se publient avec le skill `/release` (`.claude/skills/release/SKILL.md`) : il monte la version dans tous les manifestes et les deux CHANGELOG, puis pousse le tag `vX.Y.Z`, seul (jamais `git push --tags`). Le tag déclenche `.forgejo/workflows/release.yml`, qui compile l'installateur Windows (`.exe`) et les paquets Linux (`.deb`, `.rpm`), signe les paquets pour l'updater et publie la release avec son `latest.json`.
## Technologies

View file

@ -194,3 +194,4 @@ Les trois premiers viennent du skill global `pr-review`, corrigés pour ce dép
- **Transaction hors verrou.** Un `BEGIN` et son `COMMIT` envoyés par deux `db.execute` peuvent partir sur deux connexions du pool et laisser un verrou zombie (« database is locked », v0.10.0) : toujours `withTransaction` et son handle. — `docs/architecture.md` « Accès DB et transactions »
- **Dépôt public.** Aucune coordonnée d'un tiers (courriel, adresse, téléphone), aucune clé de licence ni aucun jeton dans un fichier commité, `STATE.md`, `docs/` et `.claude/skills/` compris ; un testeur se désigne par son identifiant Logto. — `.claude/skills/issue-license/SKILL.md`
- **Tests vitest qui lisent `src-tauri/`.** Des tests du front lisent des fichiers de `src-tauri/` : `src/hooks/useImportWizard.test.ts` lit les codes `SAMPLE_ERROR_*` de `fs_commands.rs` (contrat avec leur traduction), `src/services/categoryService.test.ts`, `src/__integration__/onboarding-samples.test.ts` et `src/__integration__/split-offset-manual-flag.test.ts` lisent `consolidated_schema.sql` (le dernier l'exécute en entier, seed compris), `src/utils/changelog.test.ts` la version de `tauri.conf.json`. Une PR qui ne touche que `src-tauri/**` saute `check-frontend` : la dérive ne rougit que la PR suivante qui touche `src/`, sans rapport avec elle. La revue d'une telle PR lance ces tests (`npx vitest run <fichier>`). — `check-frontend.yml` (`paths-ignore`), #384
- **Garde du README.** `check-frontend.yml` ignore `*.md` à la racine : une PR qui ne touche que `README.md` ne lance donc pas `src/__integration__/readme-guard.test.ts`, et un README qui ne la passe plus ne rougit que la PR suivante qui lance `check-frontend`, sans rapport avec lui. La revue d'une telle PR lance `npx vitest run src/__integration__/readme-guard.test.ts`. — `check-frontend.yml` (`paths-ignore`), #523

View file

@ -0,0 +1,166 @@
/**
* Guard: the README, the repository's home page on Forgejo, sends its readers to Forgejo and to
* the product page, never to the GitHub copy, and does not claim that no data leaves the
* computer (#523).
*
* What it protects. Until #523 the README sent downloads to a GitHub copy frozen at v0.4.5,
* showed a version badge read from that copy, described a release built by GitHub Actions and
* opened on « 100 % locale … Aucune donnée ne quitte votre ordinateur », false since the app
* talks to the licence server. `readmeOffences` flags:
* 1. any match of /github/i: a URL, a badge (`img.shields.io/github/`), « GitHub Actions »;
* 2. « 100 % local » or « Aucune donnée ne quitte », also across a line break or a no-break
* space;
* 3. a missing link to the French product page or to the latest Forgejo release: a Markdown
* link target, `](<url>)`, so the URL in a code span or in plain text does not count.
*
* The rule of line 3. Its sentence reuses the list of the servers the app contacts, as the
* in-app guide gives it in `docs.settings.tips[6]` (`src/i18n/locales/fr.json` and `en.json`):
* on its own, only the licence server, and only when a key is stored; updates, the Maximus
* account, feedback and market prices only on request. When that list changes, line 3 follows.
* A sentence of the guide that does not describe a connection, such as the label that the
* product page links carry (#525), does not go up into the README. This guard does not compare
* the two texts: the review does.
*
* The trap. `check-frontend.yml` ignores `*.md` at the root (`paths-ignore`), so a PR that only
* touches `README.md` does not run this guard: a README that fails it only turns red the next
* PR that runs `check-frontend`, unrelated to it. The review of such a PR runs it by hand,
* `npx vitest run src/__integration__/readme-guard.test.ts` (`REVIEW.md`, « Pièges de revue »).
*
* Each check is a test of its own on the README, passing ones included, after a canary that
* proves the file read is the README. The samples below check that each check flags what it
* targets and lets a conforming text through.
*/
import { describe, it, expect } from "vitest";
import { readFileSync } from "fs";
import { resolve } from "path";
const README = readFileSync(resolve(import.meta.dirname, "..", "..", "README.md"), "utf8");
const PRODUCT_PAGE = "https://lacompagniemaximus.com/fr/produits/simpl-resultat";
const LATEST_RELEASE = "https://git.lacompagniemaximus.com/maximus/simpl-resultat/releases/latest";
const NO_GITHUB = "no GitHub (URL, badge, « GitHub Actions »)";
const NO_FULLY_LOCAL = "no « 100 % local »";
const NO_DATA_LEAVES = "no « Aucune donnée ne quitte »";
const LINKS_PRODUCT_PAGE = "a link to the French product page";
const LINKS_LATEST_RELEASE = "a link to the latest Forgejo release";
// `g` only to list every match. `\s` also matches a line break and the no-break spaces of
// French typography (U+00A0, U+202F): a sentence wrapped over two lines, or typed with one of
// them, is still caught.
const FORBIDDEN: [check: string, pattern: RegExp][] = [
[NO_GITHUB, /github/gi],
[NO_FULLY_LOCAL, /100\s*%\s*local/gi],
[NO_DATA_LEAVES, /aucune\s+donnée\s+ne\s+quitte/gi],
];
const REQUIRED_LINKS: [check: string, url: string][] = [
[LINKS_PRODUCT_PAGE, PRODUCT_PAGE],
[LINKS_LATEST_RELEASE, LATEST_RELEASE],
];
const CHECKS = [...FORBIDDEN, ...REQUIRED_LINKS].map(([check]) => check);
interface Offence {
check: string;
/** `line <n>: <that line>` for a forbidden mention, `missing` for a required link. */
at: string;
}
/** The offences of a README text, none when it conforms. */
function readmeOffences(text: string): Offence[] {
const lines = text.split("\n");
const mentions = FORBIDDEN.flatMap(([check, pattern]) =>
[...text.matchAll(pattern)].map((match) => {
const line = text.slice(0, match.index).split("\n").length;
return { check, at: `line ${line}: ${lines[line - 1].trim()}` };
}),
);
const missing = REQUIRED_LINKS.filter(([, url]) => !text.includes(`](${url})`)).map(
([check]) => ({ check, at: "missing" }),
);
return [...mentions, ...missing];
}
/** The checks that a text fails, each named once. */
function failedChecks(text: string): string[] {
return [...new Set(readmeOffences(text).map((offence) => offence.check))];
}
const INTRO =
"Application de bureau pour importer, catégoriser et analyser vos transactions financières " +
"personnelles ou d'entreprise. Vos données restent sur votre ordinateur, et l'application " +
"fonctionne sans connexion : d'elle-même, elle ne contacte que le serveur de licences, et " +
"seulement si une clé est enregistrée ; les mises à jour, la connexion au compte Maximus, la " +
"rétroaction et les cours du marché ne partent qu'à votre demande.";
const PRODUCT_LINE = `Certaines fonctionnalités demandent la licence Base : voir le tableau des éditions sur la [page produit](${PRODUCT_PAGE}).`;
const RELEASE_LINE = ` - \`.rpm\` pour Fedora / openSUSE, depuis la [dernière release](${LATEST_RELEASE})`;
const CONFORMING = [
"# Simpl'Résultat",
INTRO,
PRODUCT_LINE,
RELEASE_LINE,
"| [SQLite](https://www.sqlite.org/) | Base de données locale |",
].join("\n\n");
describe("README guard (#523)", () => {
it("reads the README at the root of the repository", () => {
expect(README.split("\n")[0]).toBe("# Simpl'Résultat");
expect(README).toContain("\n## Installation\n");
});
it.each(CHECKS)("the README passes the check: %s", (check) => {
const found = readmeOffences(README).filter((offence) => offence.check === check);
expect(found.map((offence) => offence.at)).toEqual([]);
});
it.each([
"1. Rendez-vous sur la page [**Releases**](https://github.com/Le-King-Fu/simpl-resultat/releases/latest)",
"![Version](https://img.shields.io/github/v/release/Le-King-Fu/simpl-resultat?label=version)",
"Le workflow GitHub Actions compile automatiquement l'application pour Windows et Linux.",
"Copie archivée : https://GITHUB.COM/Le-King-Fu/simpl-resultat",
])("flags GitHub in %j", (line) => {
expect(failedChecks(`${CONFORMING}\n\n${line}\n`)).toEqual([NO_GITHUB]);
});
it.each([
["the old line 3", "Application de bureau 100 % locale pour importer, catégoriser et analyser."],
["no space", "Une application 100% locale."],
["a no-break space (U+00A0)", "Une application 100\u00a0% locale."],
["a narrow no-break space (U+202F), in capitals", "Une application 100\u202f% LOCALE."],
["a line break", "Une application 100 %\nlocale."],
])("flags « 100 % local »: %s", (_how, line) => {
expect(failedChecks(`${CONFORMING}\n\n${line}\n`)).toEqual([NO_FULLY_LOCAL]);
});
it.each([
["the old line 3", "Aucune donnée ne quitte votre ordinateur."],
["a line break", "Aucune donnée\nne quitte votre ordinateur."],
])("flags « Aucune donnée ne quitte »: %s", (_how, line) => {
expect(failedChecks(`${CONFORMING}\n\n${line}\n`)).toEqual([NO_DATA_LEAVES]);
});
it.each([
[LINKS_PRODUCT_PAGE, "removed", PRODUCT_LINE, ""],
[LINKS_PRODUCT_PAGE, "in a code span", PRODUCT_LINE, `Voir \`${PRODUCT_PAGE}\`.`],
[LINKS_PRODUCT_PAGE, "in English", PRODUCT_LINE, PRODUCT_LINE.replace("/fr/", "/en/")],
[LINKS_LATEST_RELEASE, "removed", RELEASE_LINE, ""],
[LINKS_LATEST_RELEASE, "in plain text", RELEASE_LINE, `Releases : ${LATEST_RELEASE}`],
[
LINKS_LATEST_RELEASE,
"to the list of releases",
RELEASE_LINE,
RELEASE_LINE.replace("/releases/latest", "/releases"),
],
])("flags the lack of %s, link %s", (check, _how, line, replacement) => {
expect(failedChecks(CONFORMING.replace(line, replacement))).toEqual([check]);
});
it.each([
"",
"Le tag déclenche `.forgejo/workflows/release.yml`, qui publie la release avec son `latest.json`.",
"Les rapports couvrent 100 % des transactions importées.",
"Aucune donnée comptable n'est envoyée.",
])("lets the conforming text through, plus %j", (line) => {
expect(readmeOffences(`${CONFORMING}\n\n${line}\n`)).toEqual([]);
});
});