From 3d9ef5237379a144c2655aec30f71436053e6b4c Mon Sep 17 00:00:00 2001
From: Jamil
Date: Fri, 3 Jan 2025 10:30:37 -0800
Subject: [PATCH] chore(website): Update website docs and dl links for Android
AAB/APK (#7650)
- Refactor the way we build download links on the Changelog page to make
them more flexible
- Add Android download redirects
- Update user-facing docs to mention new download options
---
.github/workflows/_kotlin.yml | 4 +-
website/redirects.js | 12 +++++
.../kb/client-apps/android-client/readme.mdx | 11 +++--
website/src/components/Changelog/Android.tsx | 16 +++++--
website/src/components/Changelog/Apple.tsx | 12 +++--
website/src/components/Changelog/Entries.tsx | 46 +++++++------------
website/src/components/Changelog/GUI.tsx | 23 ++++++++--
website/src/components/Changelog/Gateway.tsx | 18 ++++++--
website/src/components/Changelog/Headless.tsx | 18 ++++++--
website/src/middleware.ts | 5 ++
10 files changed, 111 insertions(+), 54 deletions(-)
diff --git a/.github/workflows/_kotlin.yml b/.github/workflows/_kotlin.yml
index 43479355d..43c55ab9a 100644
--- a/.github/workflows/_kotlin.yml
+++ b/.github/workflows/_kotlin.yml
@@ -63,7 +63,7 @@ jobs:
path: |
./kotlin/android/${{ matrix.output-path }}
- name: Upload package to release
- if: ${{ github.event_name == 'workflow_dispatch' || github.ref_name == 'main' }}
+ if: ${{ matrix.package-type == 'apk' && github.event_name == 'workflow_dispatch' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# mark:next-android-version
@@ -73,7 +73,7 @@ jobs:
cp "${{ matrix.output-path }}" "$ARTIFACT_PATH"
../../scripts/upload/github-release.sh
- name: Distribute release to Firebase App Distribution
- if: ${{ github.event_name == 'workflow_dispatch' || (github.ref == 'refs/heads/main' && contains(github.event.head_commit.modified, 'elixir/VERSION')) }}
+ if: ${{ matrix.package-type == 'aab' && github.event_name == 'workflow_dispatch' }}
env:
FIREBASE_APP_DISTRIBUTION_CREDENTIALS: ${{ secrets.FIREBASE_APP_DISTRIBUTION_CREDENTIALS }}
FIREBASE_CREDENTIALS_PATH: firebase-credentials.json
diff --git a/website/redirects.js b/website/redirects.js
index 0e0d67307..6dc37ee9f 100644
--- a/website/redirects.js
+++ b/website/redirects.js
@@ -1,6 +1,18 @@
// Add all server-side redirects here. Will be loaded by next.config.mjs.
module.exports = [
+ /*
+ *
+ * Android Client
+ *
+ */
+ {
+ source: "/dl/firezone-client-android/latest",
+ destination:
+ // mark:current-android-version
+ "https://www.github.com/firezone/firezone/releases/download/android-client-1.4.0/firezone-android-client-1.4.0.apk",
+ permanent: false,
+ },
/*
*
* Windows GUI Client
diff --git a/website/src/app/kb/client-apps/android-client/readme.mdx b/website/src/app/kb/client-apps/android-client/readme.mdx
index 22697b113..70cc5a5eb 100644
--- a/website/src/app/kb/client-apps/android-client/readme.mdx
+++ b/website/src/app/kb/client-apps/android-client/readme.mdx
@@ -15,7 +15,9 @@ Google Play Store.
## Installation
1. [Download the Firezone app](https://play.google.com/store/apps/details?id=dev.firezone.android)
- from the Google Play Store.
+ from the Google Play Store or
+ [download an APK](https://www.github.com/firezone/firezone/releases) from
+ GitHub.
1. Run the app. The welcome screen will show "Enable VPN Permission" and the
Firezone logo.
1. Tap `Request Permission`. Android will show a dialog saying,
@@ -54,11 +56,14 @@ use its normal DNS and Internet behavior.
## Upgrading
-Updates for the Android client are handled through the Google Play Store.
-Consult the
+Updates for the Android client are handled through the Google Play Store if you
+installed the app from there. Consult the
[Play Store documentation](https://support.google.com/googleplay/answer/113412?hl=en)
for more information on how to update apps on your device.
+If you installed the app from an APK directly, you will need to download and
+install the new APK manually.
+
## Diagnostic logs
Firezone writes log files to the device's memory. These logs stay on the device
diff --git a/website/src/components/Changelog/Android.tsx b/website/src/components/Changelog/Android.tsx
index d79bbe0c3..904d12527 100644
--- a/website/src/components/Changelog/Android.tsx
+++ b/website/src/components/Changelog/Android.tsx
@@ -5,11 +5,19 @@ import Link from "next/link";
import Unreleased from "./Unreleased";
export default function Android() {
+ const downloadLinks = [
+ {
+ href: "https://play.google.com/store/apps/details?id=dev.firezone.android",
+ title: "Download on Google Play",
+ },
+ {
+ href: "https://www.firezone.dev/dl/firezone-client-android/:version",
+ title: "Download APK",
+ },
+ ];
+
return (
-
+
{/* When you cut a release, remove any solved issues from the "known issues" lists over in `client-apps`. This must not be done when the issue's PR merges. */}
diff --git a/website/src/components/Changelog/Apple.tsx b/website/src/components/Changelog/Apple.tsx
index 24a45da31..065687ba7 100644
--- a/website/src/components/Changelog/Apple.tsx
+++ b/website/src/components/Changelog/Apple.tsx
@@ -5,11 +5,15 @@ import ChangeItem from "./ChangeItem";
import Unreleased from "./Unreleased";
export default function Apple() {
+ const downloadLinks = [
+ {
+ href: "https://apps.apple.com/us/app/firezone/id6443661826",
+ title: "Download on App Store",
+ },
+ ];
+
return (
-
+
{/* When you cut a release, remove any solved issues from the "known issues" lists over in `client-apps`. This must not be done when the issue's PR merges. */}
diff --git a/website/src/components/Changelog/Entries.tsx b/website/src/components/Changelog/Entries.tsx
index 72fecf117..74a3f2afe 100644
--- a/website/src/components/Changelog/Entries.tsx
+++ b/website/src/components/Changelog/Entries.tsx
@@ -3,16 +3,19 @@ import Entry from "./Entry";
import Link from "next/link";
import Unreleased from "./Unreleased";
+export type DownloadLink = {
+ title: string;
+ href: string;
+};
+
function Latest({
- arches,
- href,
+ downloadLinks,
title,
version,
date,
children,
}: {
- arches?: string[];
- href: string;
+ downloadLinks: DownloadLink[];
title: string;
version: string;
date: Date;
@@ -41,29 +44,15 @@ function Latest({