fix(mobile): corrige les liens vers /releases/latest/download
All checks were successful
CI / lint (push) Successful in 3m3s
CI / build (push) Successful in 3m15s
CI / intent-service-test (push) Successful in 4m28s
CI / e2e (push) Successful in 9m31s
CI / test (push) Successful in 17m39s
CI / build-android (push) Has been skipped

Verifie en conditions reelles apres le premier vrai succes de bout en
bout de release.yml (v0.2.0, Release Forgejo #12 avec batchcooking.apk
attache) : Forgejo, contrairement a GitHub, n'implemente pas le
raccourci /releases/latest/download/<fichier>. Seul /releases/latest
lui-meme resout (redirige vers la page de la release) :

  /releases/latest/download/batchcooking.apk -> 404
  /releases/latest                            -> 303 vers /releases/tag/v0.2.0 (OK)
  /releases/download/v0.2.0/batchcooking.apk  -> 200 (OK, mais pas "latest")

Corrige les deux endroits qui presumaient le raccourci GitHub (issue #65
et #66, deja mergees) pour pointer vers /releases/latest tout court : un
clic de plus via la page de release Forgejo pour atteindre le fichier,
mais un lien qui resout toujours plutot qu'un raccourci qui 404 en
permanence. Met a jour le test Cypress de la page d'accueil et le
commentaire de release.yml en consequence.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Nicolas 2026-09-06 22:03:14 +02:00
parent da3d080124
commit 29bd413de3
4 changed files with 32 additions and 22 deletions

View file

@ -104,10 +104,12 @@ jobs:
chmod +x ./gradlew
./gradlew assembleRelease -PandroidVersionName="$ANDROID_VERSION_NAME" -PandroidVersionCode="$ANDROID_VERSION_CODE"
# Nom de fichier stable, jamais versionné : c'est ce qui permet à la
# page d'accueil (#65) de pointer en permanence vers
# /releases/latest/download/batchcooking.apk sans jamais changer de
# lien d'une release à l'autre.
# Nom de fichier stable, jamais versionné : la page d'accueil (#65)
# pointe vers /releases/latest (Forgejo n'a pas l'équivalent du
# raccourci GitHub /releases/latest/download/<fichier>, seul
# /releases/latest lui-même résout) — un nom stable évite au moins que
# l'utilisateur voie un nom de fichier différent à chaque release une
# fois sur la page.
- name: Renomme l'APK sous un nom stable
run: cp apps/web/android/app/build/outputs/apk/release/app-release.apk batchcooking.apk

View file

@ -16,14 +16,14 @@ Then("I should see the landing call to action", () => {
});
// The Android build is distributed as a Forgejo release asset with a stable
// filename (issue #64 builds/attaches it). We only assert the link is there
// and points at the right URL — the file itself is external to the suite.
// filename (issue #64 builds/attaches it). Points at the release page
// itself, not a direct file URL: Forgejo has no GitHub-style
// `/releases/latest/download/<file>` shortcut, only `/releases/latest`
// resolves (verified live against the first real release). We only assert
// the link is there and points at the right URL — the file itself is
// external to the suite.
Then("I should see the Android download link", () => {
cy.get(".landing__hero .landing__mobile-link")
.should("be.visible")
.and(
"have.attr",
"href",
"https://git.dev.kyuno.fr/kyuno/batchCooking/releases/latest/download/batchcooking.apk",
);
.and("have.attr", "href", "https://git.dev.kyuno.fr/kyuno/batchCooking/releases/latest");
});

View file

@ -10,11 +10,14 @@ import { useAppUpdateCheck } from "./useAppUpdateCheck";
* `<dialog>`: a version check is informative, never something that should
* block the rest of the page.
*
* "Mettre à jour" opens the download link externally (the system browser
* handles the download + Android's own install prompt) rather than an
* in-app `PackageInstaller` flow — no `REQUEST_INSTALL_PACKAGES` permission,
* no extra native code, for a marginal UX gain (see issue #66's own
* hors-scope).
* "Mettre à jour" opens the Forgejo release page externally (not a direct
* file link — Forgejo has no GitHub-style `/releases/latest/download/<file>`
* shortcut, only `/releases/latest` itself resolves; verified live against
* the first real release) rather than an in-app `PackageInstaller` flow —
* no `REQUEST_INSTALL_PACKAGES` permission, no extra native code, for a
* marginal UX gain (see issue #66's own hors-scope). One extra tap on the
* release page to reach the actual asset, then the system browser handles
* the download + Android's own install prompt as before.
*/
export function UpdateBanner() {
const { t } = useTranslation();
@ -30,7 +33,7 @@ export function UpdateBanner() {
<div className="update-banner__actions">
<a
className="update-banner__update"
href="https://git.dev.kyuno.fr/kyuno/batchCooking/releases/latest/download/batchcooking.apk"
href="https://git.dev.kyuno.fr/kyuno/batchCooking/releases/latest"
target="_blank"
rel="noreferrer"
>

View file

@ -53,14 +53,19 @@ export function LandingPage() {
{/*
* Secondary action — an account is needed on any platform, so the
* Android build is a discreet link under the CTA row, not a third
* button. Points at the Forgejo "latest release" asset with a
* stable filename (see issue #64); 404s until that pipeline ships,
* accepted as a transient state. The hint is honest that this is a
* sideloaded .apk, not a Play Store listing.
* button. Points at the Forgejo "latest release" page (NOT a
* direct-download URL): Forgejo, unlike GitHub, has no
* `/releases/latest/download/<file>` compound route — only
* `/releases/latest` itself resolves (redirects to the release's
* own page), verified live against the first real v0.2.0 release.
* One extra click via Forgejo's own release page to reach the
* actual `batchcooking.apk` asset, but a link that will always
* resolve rather than a shortcut that 404s. The hint is honest
* that this is a sideloaded .apk, not a Play Store listing.
*/}
<a
className="landing__mobile-link"
href="https://git.dev.kyuno.fr/kyuno/batchCooking/releases/latest/download/batchcooking.apk"
href="https://git.dev.kyuno.fr/kyuno/batchCooking/releases/latest"
>
<Smartphone aria-hidden />
{t("landing.hero.mobileDownload")}