From 10b6085bf8e1bc787960a226d5287c548294449e Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 31 Jan 2024 10:57:14 +0100 Subject: [PATCH 1/5] Release script: fix issue in filename (we have a gplay variant now) --- tools/release/release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/release/release.sh b/tools/release/release.sh index f793ac2a4e..b2e7400320 100755 --- a/tools/release/release.sh +++ b/tools/release/release.sh @@ -237,8 +237,8 @@ printf "Unzipping the artifact...\n" unzip ${targetPath}/elementx-app-gplay-bundle-unsigned.zip -d ${targetPath} -unsignedBundlePath="${targetPath}/app-release.aab" -signedBundlePath="${targetPath}/app-release-signed.aab" +unsignedBundlePath="${targetPath}/app-gplay-release.aab" +signedBundlePath="${targetPath}/app-gplay-release-signed.aab" printf "\n================================================================================\n" printf "Signing file ${unsignedBundlePath} with build-tools version ${buildToolsVersion} for min SDK version ${minSdkVersion}...\n" From 275e03c92bf3a857cf250356b607ada322c2c89f Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 31 Jan 2024 11:07:29 +0100 Subject: [PATCH 2/5] Release script: Add a step to create the release on GooglePlay. --- tools/release/release.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/release/release.sh b/tools/release/release.sh index b2e7400320..a8b83b2392 100755 --- a/tools/release/release.sh +++ b/tools/release/release.sh @@ -291,6 +291,19 @@ else printf "APKs will not be generated!\n" fi +printf "\n================================================================================\n" +printf "Create the open testing release on GooglePlay.\n" + +printf "On GooglePlay console, go the the open testing section and click on \"Create new release\" button, then:\n" +printf " - upload the file ${signedBundlePath}.\n" +printf " - copy the release note from the fastlane file.\n" +printf " - download the universal APK, to be able to provide it to the GitHub release: click on the right arrow next to the \"App bundle\", then click on the \"Download\" tab, and download the \"Signed, universal APK\".\n" +printf " - submit the release.\n" +read -p "Press enter to continue. " + +printf "You can then go to \"Publishing overview\" and send the new release for a review by Google.\n" +read -p "Press enter to continue. " + printf "\n================================================================================\n" githubCreateReleaseLink="https://github.com/element-hq/element-x-android/releases/new?tag=v${version}&title=Element%20X%20Android%20v${version}&body=${changelogUrlEncoded}" printf "Creating the release on gitHub.\n" @@ -299,6 +312,7 @@ printf "Then\n" printf " - copy paste the section of the file CHANGES.md for this release (if not there yet)\n" printf " - click on the 'Generate releases notes' button\n" printf " - Add the file ${signedBundlePath} to the GitHub release.\n" +printf " - Add the universal APK, downloaded from the GooglePlay console to the GitHub release.\n" read -p ". Press enter to continue. " printf "\n================================================================================\n" From de395ba2e1962e19ce094e8789580b8f7468a46c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 31 Jan 2024 11:09:16 +0100 Subject: [PATCH 3/5] Update message sent to the room. --- tools/release/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/release/release.sh b/tools/release/release.sh index a8b83b2392..7bc5ddc0a2 100755 --- a/tools/release/release.sh +++ b/tools/release/release.sh @@ -317,7 +317,7 @@ read -p ". Press enter to continue. " printf "\n================================================================================\n" printf "Message for the Android internal room:\n\n" -message="@room Element X Android ${version} is ready to be tested. You can get it from https://github.com/element-hq/element-x-android/releases/tag/v${version}. Installation instructions can be found [here](https://github.com/element-hq/element-x-android/blob/develop/docs/install_from_github_release.md). Please report any feedback. Thanks!" +message="@room Element X Android ${version} is ready to be tested. You can get it from https://github.com/element-hq/element-x-android/releases/tag/v${version}. You can install the universal APK. If you want to install the application from the app bundle, you can follow instructions [here](https://github.com/element-hq/element-x-android/blob/develop/docs/install_from_github_release.md). Please report any feedback. Thanks!" printf "${message}\n\n" if [[ -z "${elementBotToken}" ]]; then From 969962f4bc1f638c4e7c8521e02bb2b5da41f1b5 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 31 Jan 2024 11:16:21 +0100 Subject: [PATCH 4/5] Update recipe to install the app from a GitHub release. GitHub release now should provide a universal APK. --- docs/install_from_github_release.md | 42 ++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/docs/install_from_github_release.md b/docs/install_from_github_release.md index 069e1d97ec..6365765d44 100644 --- a/docs/install_from_github_release.md +++ b/docs/install_from_github_release.md @@ -4,13 +4,43 @@ This document explains how to install Element X Android from a Github Release. -* [Requirements](#requirements) -* [Steps](#steps) -* [I already have the application on my phone](#i-already-have-the-application-on-my-phone) +* [Installing the universal APK](#installing-the-universal-apk) + * [Instructions](#instructions) + * [Steps](#steps) + * [I already have the application on my phone](#i-already-have-the-application-on-my-phone) +* [Installing from the App Bundle](#installing-from-the-app-bundle) + * [Requirements](#requirements) + * [Steps](#steps) + * [I already have the application on my phone](#i-already-have-the-application-on-my-phone) -## Requirements +## Installing the universal APK + +### Instructions + +The easiest way to install the application from the application from a GitHub release is to use the universal APK which is attached to the release. This APK is compatible with all Android devices, but it is not optimized for any of them. So it may not be as fast as it could be on your device, and it may not be as small as it could be. + +Alternatively, you can generate an APK that is optimized for your device. This is explained in the next section. + +### Steps + +- Open the GitHub release that you want to install from using the Web browser of your phone. +- Download the APK +- Open the APK file from the download notification, or from the file manager +- Follow the steps to install the application + +### I already have the application on my phone + +If the application was already installed on your phone, there are several cases: + +- it was installed from the PlayStore, you can install the universal APK as soon as the version is more recent. The existing data should not be lost. +- it was installed from a previous GitHub release, this is like an application upgrade. +- it was installed from a more recent GitHub release, or from the PlayStore with a later version, you will have to uninstall it first. + +## Installing from the App Bundle + +### Requirements The Github release will contain an Android App Bundle (with `aab` extension) file, unlike in the Element Android project where releases directly provide the APKs. So there are some steps to perform to generate and sign App Bundle APKs. An APK suitable for the targeted device will then be generated. @@ -31,7 +61,7 @@ You will also need to install [bundletool](https://developer.android.com/studio/ brew install bundletool ``` -## Steps +### Steps 1. Open the GitHub release that you want to install from https://github.com/element-hq/element-x-android/releases 2. Download the asset `app-release-signed.aab` @@ -55,7 +85,7 @@ bundletool install-apks --apks=./tmp/elementx.apks That's it, the application should be installed on your device, you can start it from the launcher icon. -## I already have the application on my phone +### I already have the application on my phone If the application was already installed on your phone, there are several cases: From 3c182a0009b06071cb584ec4cd9ea6914beec2c9 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 31 Jan 2024 11:51:30 +0100 Subject: [PATCH 5/5] Fix small typos Co-authored-by: Jorge Martin Espinosa --- docs/install_from_github_release.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/install_from_github_release.md b/docs/install_from_github_release.md index 6365765d44..5be1c0c3b0 100644 --- a/docs/install_from_github_release.md +++ b/docs/install_from_github_release.md @@ -19,7 +19,7 @@ This document explains how to install Element X Android from a Github Release. ### Instructions -The easiest way to install the application from the application from a GitHub release is to use the universal APK which is attached to the release. This APK is compatible with all Android devices, but it is not optimized for any of them. So it may not be as fast as it could be on your device, and it may not be as small as it could be. +The easiest way to install the application from a GitHub release is to use the universal APK which is attached to the release. This APK is compatible with all Android devices, but it is not optimized for any of them. So it may not be as fast as it could be on your device, and it may not be as small as it could be. Alternatively, you can generate an APK that is optimized for your device. This is explained in the next section. @@ -34,7 +34,7 @@ Alternatively, you can generate an APK that is optimized for your device. This i If the application was already installed on your phone, there are several cases: -- it was installed from the PlayStore, you can install the universal APK as soon as the version is more recent. The existing data should not be lost. +- it was installed from the PlayStore, you can install the universal APK as long as the version is more recent. The existing data should not be lost. - it was installed from a previous GitHub release, this is like an application upgrade. - it was installed from a more recent GitHub release, or from the PlayStore with a later version, you will have to uninstall it first.