fix(mobile): corrige les liens vers /releases/latest/download #76
4 changed files with 32 additions and 22 deletions
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -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")}
|
||||
|
|
|
|||
Loading…
Reference in a new issue