commita588989d13Merge:56067300e05ee3eefe96Author: Benoit Marty <benoitm@matrix.org> Date: Fri Jan 6 18:45:18 2023 +0100 Merge pull request #7875 from vector-im/feature/bma/releaseScript3 Release script update commit56067300e0Merge:baa46634b5330a9be787Author: Benoit Marty <benoitm@matrix.org> Date: Fri Jan 6 18:44:55 2023 +0100 Merge pull request #7905 from RiotTranslateBot/weblate-element-android-element-app Translations update from Weblate commitbaa46634b5Merge:93021a60280d2fb8e3d0Author: Benoit Marty <benoitm@matrix.org> Date: Fri Jan 6 18:44:37 2023 +0100 Merge pull request #7885 from vector-im/feature/bma/fixLint Fix lint false positive commit93021a6028Merge:f856142cdce9d1de8fbaAuthor: Benoit Marty <benoitm@matrix.org> Date: Fri Jan 6 18:43:53 2023 +0100 Merge pull request #7724 from vector-im/feature/bma/launchWhenResumed Observe ViewEvents only when resumed commite9d1de8fbaAuthor: Benoit Marty <benoit@matrix.org> Date: Fri Jan 6 17:36:40 2023 +0100 Fix compilation issue after rebase. commit330a9be787Merge:f856142cdc4f2550ae92Author: Weblate <noreply@weblate.org> Date: Fri Jan 6 16:33:47 2023 +0000 Merge branch 'origin/develop' into Weblate. commit4f2550ae92Author: Linerly <linerly@protonmail.com> Date: Wed Jan 4 22:47:24 2023 +0000 Translated using Weblate (Indonesian) Currently translated at 100.0% (89 of 89 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/id/ commit5734a270d8Author: waclaw66 <waclaw66@seznam.cz> Date: Wed Jan 4 16:04:26 2023 +0000 Translated using Weblate (Czech) Currently translated at 100.0% (89 of 89 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/cs/ commit0882e1bf81Author: Jeff Huang <s8321414@gmail.com> Date: Thu Jan 5 02:10:13 2023 +0000 Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (89 of 89 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/zh_Hant/ commit53db988525Author: Christian Paul <info@jaller.de> Date: Thu Jan 5 16:06:48 2023 +0000 Translated using Weblate (Esperanto) Currently translated at 2.2% (2 of 89 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/eo/ commitff9cf8fd2fAuthor: Danial Behzadi <dani.behzi@ubuntu.com> Date: Wed Jan 4 17:43:34 2023 +0000 Translated using Weblate (Persian) Currently translated at 100.0% (89 of 89 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/fa/ commit8a5aad1ba0Author: Priit Jõerüüt <riot@joeruut.com> Date: Thu Jan 5 07:22:25 2023 +0000 Translated using Weblate (Estonian) Currently translated at 100.0% (89 of 89 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/et/ commit2903a644f2Author: Ihor Hordiichuk <igor_ck@outlook.com> Date: Wed Jan 4 19:24:53 2023 +0000 Translated using Weblate (Ukrainian) Currently translated at 100.0% (89 of 89 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/uk/ commit96363fb789Author: Jozef Gaal <preklady@mayday.sk> Date: Wed Jan 4 16:18:18 2023 +0000 Translated using Weblate (Slovak) Currently translated at 100.0% (89 of 89 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/sk/ commit271b828be0Author: Szimszon <github@oregpreshaz.eu> Date: Wed Jan 4 18:55:35 2023 +0000 Translated using Weblate (Hungarian) Currently translated at 100.0% (89 of 89 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/hu/ commitbd21f032d4Author: Glandos <bugs-github@antipoul.fr> Date: Thu Jan 5 08:42:07 2023 +0000 Translated using Weblate (French) Currently translated at 100.0% (89 of 89 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/fr/ commit860df01902Author: Vri <element@vrifox.cc> Date: Wed Jan 4 16:20:15 2023 +0000 Translated using Weblate (German) Currently translated at 100.0% (89 of 89 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/de/ commited84212c78Author: Besnik Bleta <besnik@programeshqip.org> Date: Wed Jan 4 17:01:03 2023 +0000 Translated using Weblate (Albanian) Currently translated at 99.3% (2558 of 2576 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/sq/ commitf790921785Author: Mateus Rodrigues Costa <mateusrodcosta@gmail.com> Date: Wed Jan 4 21:12:32 2023 +0000 Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (2576 of 2576 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/ commit3098ec140dAuthor: overtinkering <overtinker@yandex.com> Date: Thu Jan 5 18:02:33 2023 +0000 Translated using Weblate (Spanish) Currently translated at 90.7% (2338 of 2576 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/es/ commit725722d3f2Author: Christian Paul <info@jaller.de> Date: Thu Jan 5 16:14:10 2023 +0000 Translated using Weblate (Esperanto) Currently translated at 76.0% (1960 of 2576 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/eo/ commitea924642ceAuthor: Christian Paul <info@jaller.de> Date: Thu Jan 5 16:51:43 2023 +0000 Translated using Weblate (Danish) Currently translated at 10.2% (264 of 2576 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/da/ commitf856142cdcMerge:b7076a13dc85cfa433d9Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Jan 6 16:07:44 2023 +0100 Merge pull request #7886 from vector-im/feature/mna/past-polls-ui [Poll] Render past polls list of a room (PSG-1029) commitb7076a13dcMerge:41bcdd7232dbf3b76331Author: Benoit Marty <benoitm@matrix.org> Date: Fri Jan 6 15:16:16 2023 +0100 Merge pull request #7879 from vector-im/feature/bma/still_investigating Reduce number of crypto database transactions when handling the sync response commit7b1724f6ddAuthor: Benoit Marty <benoit@matrix.org> Date: Fri Jan 6 15:13:01 2023 +0100 changelog commit9768430d5cAuthor: Benoit Marty <benoit@matrix.org> Date: Mon Dec 19 18:32:07 2022 +0100 Fix test compilation issue commit71bd4f457aAuthor: Benoit Marty <benoit@matrix.org> Date: Wed Dec 7 17:48:25 2022 +0100 Ensure posted events from the ViewModel are consumed (once) by the UI Inspired from https://github.com/Kotlin/kotlinx.coroutines/issues/3002 commit9c79d23444Author: Benoit Marty <benoitm@matrix.org> Date: Fri Dec 16 21:02:33 2022 +0100 Ensure event are not sent if the lifecycle state is not RESUMED commit0dd1abb926Author: Benoit Marty <benoit@matrix.org> Date: Tue Dec 6 13:02:02 2022 +0100 Rename method commit41bcdd7232Merge:b8da53b3bb7fc9705f3aAuthor: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Jan 6 14:18:20 2023 +0100 Merge pull request #7867 from vector-im/feature/mna/active-polls-ui [Poll] Render active polls list of a room (PSG-908) commit85cfa433d9Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Jan 6 14:13:58 2023 +0100 Using ordinal of enum to render tabs commitb8da53b3bbAuthor: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Jan 6 11:56:11 2023 +0000 Bump checker from 3.27.0 to 3.29.0 (#7903) Bumps [checker](https://github.com/typetools/checker-framework) from 3.27.0 to 3.29.0. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.27.0...checker-framework-3.29.0) --- updated-dependencies: - dependency-name: org.checkerframework:checker dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commite88e874697Merge:2e95d4f97cc3ad7faa2cAuthor: Benoit Marty <benoitm@matrix.org> Date: Fri Jan 6 10:35:14 2023 +0100 Merge pull request #7865 from vector-im/dependabot/gradle/org.owasp-dependency-check-gradle-7.4.3 Bump dependency-check-gradle from 7.4.1 to 7.4.3 commit2e95d4f97cMerge:f1bd9b2cf387e661e3b5Author: Florian Renaud <Florian14@users.noreply.github.com> Date: Fri Jan 6 09:10:00 2023 +0100 Merge pull request #7899 from vector-im/bugfix/fre/buffering_on_last_chunk [Voice Broadcast] Stop listening if we reach the last received chunk and there is no last sequence number commit9b5fda2689Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Thu Jan 5 15:45:35 2023 +0100 Fix after rebase commita5d076a28aAuthor: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Wed Jan 4 10:49:07 2023 +0100 Adding total votes status for ended poll items commit05363dc8caAuthor: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Wed Jan 4 10:30:57 2023 +0100 Adding winner option views for ended poll items commit1cc26449f3Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Wed Jan 4 10:12:34 2023 +0100 Renaming some ui fields commit3deae1101cAuthor: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Tue Jan 3 17:32:41 2023 +0100 Adding extra data for ended poll commitcf82486efaAuthor: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 17:38:55 2022 +0100 Adding mocked data for ended polls commit740591cd38Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 17:31:23 2022 +0100 Updating unit tests commitcb45056c1aAuthor: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 17:28:57 2022 +0100 Mutualizing list fragments and add ended polls tab commit0b535910d6Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 15:50:32 2022 +0100 Adding changelog entry commit7fc9705f3aAuthor: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Thu Jan 5 16:37:06 2023 +0100 Adding importantForAccessibility attribute to icon commit2dab6ed052Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Thu Jan 5 15:27:11 2023 +0100 Fix horizontal margin of tabs commitff9e78be42Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Thu Jan 5 15:20:20 2023 +0100 Use classical for loop instead of forEach commitd60403545cAuthor: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Thu Jan 5 15:09:41 2023 +0100 Renaming of filter enum commit87e661e3b5Author: Florian Renaud <florianr@element.io> Date: Thu Jan 5 14:36:22 2023 +0100 Add changelog file commit0d2fb8e3d0Author: Benoit Marty <benoit@matrix.org> Date: Wed Jan 4 10:17:35 2023 +0100 Lint: fix KotlinNullnessAnnotation warning commitdbf3b76331Author: Benoit Marty <benoitm@matrix.org> Date: Thu Jan 5 11:54:19 2023 +0100 Update doc. commit27d32188bfAuthor: Benoit Marty <benoit@matrix.org> Date: Thu Jan 5 11:04:20 2023 +0100 Aggregate data outside of the RealmCryptoStore. commit682bb8bde0Author: Florian Renaud <florianr@element.io> Date: Wed Jan 4 14:06:58 2023 +0100 VB - Stop listening if we reach the last received chunk and there is no last sequence number commit30940cb937Author: Benoit Marty <benoit@matrix.org> Date: Thu Jan 5 09:53:12 2023 +0100 Rename `UserCrossSigningKeys` to `UserIdentity` commit7e26c4b6f2Author: Benoit Marty <benoit@matrix.org> Date: Thu Jan 5 09:48:25 2023 +0100 Rename fun commit354554e843Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 16:45:28 2022 +0100 Ignore missing ContentDescription commite82c7afdaeAuthor: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 15:48:14 2022 +0100 Replace usage of colorAccent commit6c0c5e5064Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 15:12:12 2022 +0100 Rename poll item layout to be more generic commitbd9c53a96cAuthor: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 14:57:37 2022 +0100 Show message when list is empty commite0b77936c1Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 14:27:11 2022 +0100 Changing the date format commitbc985aa1efAuthor: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 14:19:50 2022 +0100 Adding unit tests for ViewModel commit71b7edc6f2Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 12:12:57 2022 +0100 Adding debug log commitbf67d2529fAuthor: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 12:08:55 2022 +0100 Allow access of poll history only in debug variant commit8de86e7480Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 11:59:48 2022 +0100 Render mocked data get from use case commit77d3b7da04Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 11:40:41 2022 +0100 Fix missing id in Epoxy model commitf20513eb16Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 10:56:44 2022 +0100 Render the active polls list on fragment commit7b63f891c3Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 10:42:42 2022 +0100 Epoxy controller to render active poll list commit9f97579f9dAuthor: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri Dec 30 10:07:50 2022 +0100 Epoxy model for active poll commit10133bd20fAuthor: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Thu Dec 29 17:46:07 2022 +0100 Setup tab layout when landing on the room polls screen commit7436c2e1f5Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Thu Dec 29 16:41:42 2022 +0100 Navigate to new empty screen commitcba960fbd7Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Thu Dec 29 16:05:52 2022 +0100 Adding new entry "Poll history" into room profile screen commite903dac224Author: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Thu Dec 29 15:40:59 2022 +0100 Adding changelog entry commit437b93cc18Author: Benoit Marty <benoitm@matrix.org> Date: Wed Jan 4 11:35:04 2023 +0100 Add some doc commit06f3c11010Author: Benoit Marty <benoit@matrix.org> Date: Tue Jan 3 16:43:09 2023 +0100 Changelog commit02e7157206Author: Benoit Marty <benoitm@matrix.org> Date: Tue Jan 3 16:16:17 2023 +0100 Introduce CryptoCrossSigningKeys container commit4c4ef0d73eAuthor: Benoit Marty <benoitm@matrix.org> Date: Tue Jan 3 15:57:39 2023 +0100 Batch insertion of user data after downloading keys. commitf26178fc21Author: Benoit Marty <benoitm@matrix.org> Date: Tue Jan 3 15:21:03 2023 +0100 Avoid useless transaction commita386a4762cAuthor: Benoit Marty <benoitm@matrix.org> Date: Tue Jan 3 15:18:32 2023 +0100 Crypto store: Log realm transactions and the duration commitc1a8bf828bAuthor: Benoit Marty <benoitm@matrix.org> Date: Tue Jan 3 15:15:15 2023 +0100 Batch insertion of `shouldEncryptForInvitedMembers` commit6f384c799fAuthor: Benoit Marty <benoitm@matrix.org> Date: Tue Jan 3 15:02:45 2023 +0100 Batch insertion of `shouldShareHistory` commit0e504e9014Author: Benoit Marty <benoitm@matrix.org> Date: Tue Jan 3 11:55:41 2023 +0100 Format commit837590104dAuthor: Benoit Marty <benoitm@matrix.org> Date: Tue Jan 3 11:55:32 2023 +0100 Avoid launching coroutine for nothing. commit56986c3a77Author: Benoit Marty <benoit@matrix.org> Date: Mon Jan 2 21:15:08 2023 +0100 Add a way to get the access token from the advances settings. commit5ee3eefe96Author: Benoit Marty <benoit@matrix.org> Date: Mon Jan 2 16:55:25 2023 +0100 Pull branch sooner to ensure release version is correctly guessed commitc3ad7faa2cAuthor: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu Dec 29 23:02:43 2022 +0000 Bump dependency-check-gradle from 7.4.1 to 7.4.3 Bumps dependency-check-gradle from 7.4.1 to 7.4.3. --- updated-dependencies: - dependency-name: org.owasp:dependency-check-gradle dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> commitb3d578d6b8Author: Benoit Marty <benoit@matrix.org> Date: Thu Dec 15 12:44:40 2022 +0100 Release script: Improve creation of the release on GitHub. commit5e1d3e6c8dAuthor: Benoit Marty <benoitm@matrix.org> Date: Thu Dec 15 12:09:27 2022 +0100 Escape %
394 lines
18 KiB
Bash
Executable File
394 lines
18 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
#
|
|
# Copyright (c) 2022 New Vector Ltd
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
|
|
# Ignore any error to not stop the script
|
|
set +e
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "| Welcome to the release script! |\n"
|
|
printf "================================================================================\n"
|
|
|
|
printf "Checking environment...\n"
|
|
envError=0
|
|
|
|
# Path of the key store (it's a file)
|
|
keyStorePath="${ELEMENT_KEYSTORE_PATH}"
|
|
if [[ -z "${keyStorePath}" ]]; then
|
|
printf "Fatal: ELEMENT_KEYSTORE_PATH is not defined in the environment.\n"
|
|
envError=1
|
|
fi
|
|
# Keystore password
|
|
keyStorePassword="${ELEMENT_KEYSTORE_PASSWORD}"
|
|
if [[ -z "${keyStorePassword}" ]]; then
|
|
printf "Fatal: ELEMENT_KEYSTORE_PASSWORD is not defined in the environment.\n"
|
|
envError=1
|
|
fi
|
|
# Key password
|
|
keyPassword="${ELEMENT_KEY_PASSWORD}"
|
|
if [[ -z "${keyPassword}" ]]; then
|
|
printf "Fatal: ELEMENT_KEY_PASSWORD is not defined in the environment.\n"
|
|
envError=1
|
|
fi
|
|
# GitHub token
|
|
gitHubToken="${ELEMENT_GITHUB_TOKEN}"
|
|
if [[ -z "${gitHubToken}" ]]; then
|
|
printf "Fatal: ELEMENT_GITHUB_TOKEN is not defined in the environment.\n"
|
|
envError=1
|
|
fi
|
|
# Android home
|
|
androidHome="${ANDROID_HOME}"
|
|
if [[ -z "${androidHome}" ]]; then
|
|
printf "Fatal: ANDROID_HOME is not defined in the environment.\n"
|
|
envError=1
|
|
fi
|
|
# @elementbot:matrix.org matrix token / Not mandatory
|
|
elementBotToken="${ELEMENT_BOT_MATRIX_TOKEN}"
|
|
if [[ -z "${elementBotToken}" ]]; then
|
|
printf "Warning: ELEMENT_BOT_MATRIX_TOKEN is not defined in the environment.\n"
|
|
fi
|
|
|
|
if [ ${envError} == 1 ]; then
|
|
exit 1
|
|
fi
|
|
|
|
buildToolsVersion="30.0.2"
|
|
buildToolsPath="${androidHome}/build-tools/${buildToolsVersion}"
|
|
|
|
if [[ ! -d ${buildToolsPath} ]]; then
|
|
printf "Fatal: ${buildToolsPath} folder not found, ensure that you have installed the SDK version ${buildToolsVersion}.\n"
|
|
exit 1
|
|
fi
|
|
|
|
# Check if git flow is enabled
|
|
git flow config >/dev/null 2>&1
|
|
if [[ $? == 0 ]]
|
|
then
|
|
printf "Git flow is initialized\n"
|
|
else
|
|
printf "Git flow is not initialized. Initializing...\n"
|
|
# All default value, just set 'v' for tag prefix
|
|
git flow init -d -t 'v'
|
|
fi
|
|
|
|
printf "OK\n"
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Ensuring main and develop branches are up to date...\n"
|
|
|
|
git checkout main
|
|
git pull
|
|
git checkout develop
|
|
git pull
|
|
|
|
printf "\n================================================================================\n"
|
|
# Guessing version to propose a default version
|
|
versionMajorCandidate=`grep "ext.versionMajor" ./vector-app/build.gradle | cut -d " " -f3`
|
|
versionMinorCandidate=`grep "ext.versionMinor" ./vector-app/build.gradle | cut -d " " -f3`
|
|
versionPatchCandidate=`grep "ext.versionPatch" ./vector-app/build.gradle | cut -d " " -f3`
|
|
versionCandidate="${versionMajorCandidate}.${versionMinorCandidate}.${versionPatchCandidate}"
|
|
|
|
read -p "Please enter the release version (example: ${versionCandidate}). Just press enter if ${versionCandidate} is correct. " version
|
|
version=${version:-${versionCandidate}}
|
|
|
|
# extract major, minor and patch for future use
|
|
versionMajor=`echo ${version} | cut -d "." -f1`
|
|
versionMinor=`echo ${version} | cut -d "." -f2`
|
|
versionPatch=`echo ${version} | cut -d "." -f3`
|
|
nextPatchVersion=$((versionPatch + 2))
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Starting the release ${version}\n"
|
|
git flow release start ${version}
|
|
|
|
# Note: in case the release is already started and the script is started again, checkout the release branch again.
|
|
ret=$?
|
|
if [[ $ret -ne 0 ]]; then
|
|
printf "Mmh, it seems that the release is already started. Checking out the release branch...\n"
|
|
git checkout "release/${version}"
|
|
fi
|
|
|
|
# Ensure version is OK
|
|
cp ./vector-app/build.gradle ./vector-app/build.gradle.bak
|
|
sed "s/ext.versionMajor = .*/ext.versionMajor = ${versionMajor}/" ./vector-app/build.gradle.bak > ./vector-app/build.gradle
|
|
sed "s/ext.versionMinor = .*/ext.versionMinor = ${versionMinor}/" ./vector-app/build.gradle > ./vector-app/build.gradle.bak
|
|
sed "s/ext.versionPatch = .*/ext.versionPatch = ${versionPatch}/" ./vector-app/build.gradle.bak > ./vector-app/build.gradle
|
|
rm ./vector-app/build.gradle.bak
|
|
cp ./matrix-sdk-android/build.gradle ./matrix-sdk-android/build.gradle.bak
|
|
sed "s/\"SDK_VERSION\", .*$/\"SDK_VERSION\", \"\\\\\"${version}\\\\\"\"/" ./matrix-sdk-android/build.gradle.bak > ./matrix-sdk-android/build.gradle
|
|
rm ./matrix-sdk-android/build.gradle.bak
|
|
|
|
# This commit may have no effect because generally we do not change the version during the release.
|
|
git commit -a -m "Setting version for the release ${version}"
|
|
|
|
printf "\n================================================================================\n"
|
|
read -p "Please check the crashes from the PlayStore. You can commit fixes if any on the release branch. Press enter when it's done."
|
|
|
|
printf "\n================================================================================\n"
|
|
read -p "Please check the rageshake with the current dev version: https://github.com/matrix-org/element-android-rageshakes/labels/${version}-dev. You can commit fixes if any on the release branch. Press enter when it's done."
|
|
|
|
printf "\n================================================================================\n"
|
|
read -p "Please make sure an emulator is running and press enter when it is ready."
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Checking if Synapse is running...\n"
|
|
httpCode=`curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:8080/_matrix/static`
|
|
|
|
if [[ ${httpCode} -ne "302" ]]; then
|
|
read -p "Please make sure Synapse is running (open http://127.0.0.1:8080) and press enter when it is ready."
|
|
else
|
|
printf "Synapse is running!\n"
|
|
fi
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Uninstalling previous test app if any...\n"
|
|
adb -e uninstall im.vector.app.debug.test
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Running the integration test UiAllScreensSanityTest.allScreensTest()...\n"
|
|
./gradlew connectedGplayDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=im.vector.app.ui.UiAllScreensSanityTest
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Building the app...\n"
|
|
./gradlew assembleGplayDebug
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Uninstalling previous test app if any...\n"
|
|
adb -e uninstall im.vector.app.debug
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Installing the app...\n"
|
|
adb -e install ./vector-app/build/outputs/apk/gplay/debug/vector-gplay-arm64-v8a-debug.apk
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Running the app...\n"
|
|
# TODO This does not work, need to be fixed
|
|
adb -e shell am start -n im.vector.app.debug/im.vector.app.features.Alias -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
|
|
|
|
printf "\n================================================================================\n"
|
|
# TODO could build and deploy the APK to any emulator
|
|
read -p "Create an account on matrix.org and do some smoke tests that the sanity test does not cover like: 1-1 call, 1-1 video call, Jitsi call for instance. Press enter when it's done."
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Running towncrier...\n"
|
|
yes | towncrier build --version "v${version}"
|
|
|
|
printf "\n================================================================================\n"
|
|
read -p "Check the file CHANGES.md consistency. It's possible to reorder items (most important changes first) or change their section if relevant. Also an opportunity to fix some typo, or rewrite things. Do not commit your change. Press enter when it's done."
|
|
|
|
# Get the changes to use it to create the GitHub release
|
|
changelogUrlEncoded=`git diff CHANGES.md | grep ^+ | tail -n +2 | cut -c2- | jq -sRr @uri | sed s/\(/%28/g | sed s/\)/%29/g`
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Committing...\n"
|
|
git commit -a -m "Changelog for version ${version}"
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Creating fastlane file...\n"
|
|
printf -v versionMajor2Digits "%02d" ${versionMajor}
|
|
printf -v versionMinor2Digits "%02d" ${versionMinor}
|
|
printf -v versionPatch2Digits "%02d" ${versionPatch}
|
|
fastlaneFile="4${versionMajor2Digits}${versionMinor2Digits}${versionPatch2Digits}0.txt"
|
|
fastlanePathFile="./fastlane/metadata/android/en-US/changelogs/${fastlaneFile}"
|
|
printf "Main changes in this version: TODO.\nFull changelog: https://github.com/vector-im/element-android/releases" > ${fastlanePathFile}
|
|
|
|
read -p "I have created the file ${fastlanePathFile}, please edit it and press enter when it's done."
|
|
git add ${fastlanePathFile}
|
|
git commit -a -m "Adding fastlane file for version ${version}"
|
|
|
|
printf "\n================================================================================\n"
|
|
# We could propose to push the branch and create a PR
|
|
read -p "(optional) Push the branch and start a draft PR (will not be merged), to check that the CI is happy with all the changes. Press enter when it's done."
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "OK, finishing the release...\n"
|
|
git flow release finish "${version}"
|
|
|
|
printf "\n================================================================================\n"
|
|
read -p "Done, push the branch 'main' and the new tag (yes/no) default to yes? " doPush
|
|
doPush=${doPush:-yes}
|
|
|
|
if [ ${doPush} == "yes" ]; then
|
|
printf "Pushing branch 'main' and tag 'v${version}'...\n"
|
|
git push origin main
|
|
git push origin "v${version}"
|
|
else
|
|
printf "Not pushing, do not forget to push manually!\n"
|
|
fi
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Checking out develop...\n"
|
|
git checkout develop
|
|
|
|
# Set next version
|
|
printf "\n================================================================================\n"
|
|
printf "Setting next version on file './vector-app/build.gradle'...\n"
|
|
cp ./vector-app/build.gradle ./vector-app/build.gradle.bak
|
|
sed "s/ext.versionPatch = .*/ext.versionPatch = ${nextPatchVersion}/" ./vector-app/build.gradle.bak > ./vector-app/build.gradle
|
|
rm ./vector-app/build.gradle.bak
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Setting next version on file './matrix-sdk-android/build.gradle'...\n"
|
|
nextVersion="${versionMajor}.${versionMinor}.${nextPatchVersion}"
|
|
cp ./matrix-sdk-android/build.gradle ./matrix-sdk-android/build.gradle.bak
|
|
sed "s/\"SDK_VERSION\", .*$/\"SDK_VERSION\", \"\\\\\"${nextVersion}\\\\\"\"/" ./matrix-sdk-android/build.gradle.bak > ./matrix-sdk-android/build.gradle
|
|
rm ./matrix-sdk-android/build.gradle.bak
|
|
|
|
printf "\n================================================================================\n"
|
|
read -p "I have updated the versions to prepare the next release, please check that the change are correct and press enter so I can commit."
|
|
|
|
printf "Committing...\n"
|
|
git commit -a -m 'version++'
|
|
|
|
printf "\n================================================================================\n"
|
|
read -p "Done, push the branch 'develop' (yes/no) default to yes? (A rebase may be necessary in case develop got new commits)" doPush
|
|
doPush=${doPush:-yes}
|
|
|
|
if [ ${doPush} == "yes" ]; then
|
|
printf "Pushing branch 'develop'...\n"
|
|
git push origin develop
|
|
else
|
|
printf "Not pushing, do not forget to push manually!\n"
|
|
fi
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Wait for the GitHub action https://github.com/vector-im/element-android/actions/workflows/build.yml?query=branch%%3Amain to build the 'main' branch.\n"
|
|
read -p "After GHA is finished, please enter the artifact URL (for 'vector-gplay-release-unsigned'): " artifactUrl
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Downloading the artifact...\n"
|
|
|
|
# Download files
|
|
targetPath="./tmp/Element/${version}"
|
|
|
|
# Ignore error
|
|
set +e
|
|
|
|
python3 ./tools/release/download_github_artifacts.py \
|
|
--token ${gitHubToken} \
|
|
--artifactUrl ${artifactUrl} \
|
|
--directory ${targetPath} \
|
|
--ignoreErrors
|
|
|
|
# Do not ignore error
|
|
set -e
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Unzipping the artifact...\n"
|
|
|
|
unzip ${targetPath}/vector-gplay-release-unsigned.zip -d ${targetPath}
|
|
|
|
# Flatten folder hierarchy
|
|
mv ${targetPath}/gplay/release/* ${targetPath}
|
|
rm -rf ${targetPath}/gplay
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Signing the APKs...\n"
|
|
|
|
cp ${targetPath}/vector-gplay-arm64-v8a-release-unsigned.apk \
|
|
${targetPath}/vector-gplay-arm64-v8a-release-signed.apk
|
|
./tools/release/sign_apk_unsafe.sh \
|
|
${keyStorePath} \
|
|
${targetPath}/vector-gplay-arm64-v8a-release-signed.apk \
|
|
${keyStorePassword} \
|
|
${keyPassword}
|
|
|
|
cp ${targetPath}/vector-gplay-armeabi-v7a-release-unsigned.apk \
|
|
${targetPath}/vector-gplay-armeabi-v7a-release-signed.apk
|
|
./tools/release/sign_apk_unsafe.sh \
|
|
${keyStorePath} \
|
|
${targetPath}/vector-gplay-armeabi-v7a-release-signed.apk \
|
|
${keyStorePassword} \
|
|
${keyPassword}
|
|
|
|
cp ${targetPath}/vector-gplay-x86-release-unsigned.apk \
|
|
${targetPath}/vector-gplay-x86-release-signed.apk
|
|
./tools/release/sign_apk_unsafe.sh \
|
|
${keyStorePath} \
|
|
${targetPath}/vector-gplay-x86-release-signed.apk \
|
|
${keyStorePassword} \
|
|
${keyPassword}
|
|
|
|
cp ${targetPath}/vector-gplay-x86_64-release-unsigned.apk \
|
|
${targetPath}/vector-gplay-x86_64-release-signed.apk
|
|
./tools/release/sign_apk_unsafe.sh \
|
|
${keyStorePath} \
|
|
${targetPath}/vector-gplay-x86_64-release-signed.apk \
|
|
${keyStorePassword} \
|
|
${keyPassword}
|
|
|
|
# Ref: https://docs.fastlane.tools/getting-started/android/beta-deployment/#uploading-your-app
|
|
# set SUPPLY_APK_PATHS="${targetPath}/vector-gplay-arm64-v8a-release-unsigned.apk,${targetPath}/vector-gplay-armeabi-v7a-release-unsigned.apk,${targetPath}/vector-gplay-x86-release-unsigned.apk,${targetPath}/vector-gplay-x86_64-release-unsigned.apk"
|
|
#
|
|
# ./fastlane beta
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Please check the information below:\n"
|
|
|
|
printf "File vector-gplay-arm64-v8a-release-signed.apk:\n"
|
|
${buildToolsPath}/aapt dump badging ${targetPath}/vector-gplay-arm64-v8a-release-signed.apk | grep package
|
|
printf "File vector-gplay-armeabi-v7a-release-signed.apk:\n"
|
|
${buildToolsPath}/aapt dump badging ${targetPath}/vector-gplay-armeabi-v7a-release-signed.apk | grep package
|
|
printf "File vector-gplay-x86-release-signed.apk:\n"
|
|
${buildToolsPath}/aapt dump badging ${targetPath}/vector-gplay-x86-release-signed.apk | grep package
|
|
printf "File vector-gplay-x86_64-release-signed.apk:\n"
|
|
${buildToolsPath}/aapt dump badging ${targetPath}/vector-gplay-x86_64-release-signed.apk | grep package
|
|
|
|
printf "\n"
|
|
read -p "Does it look correct? Press enter when it's done."
|
|
|
|
printf "\n================================================================================\n"
|
|
read -p "Installing apk on a real device, press enter when a real device is connected. "
|
|
apkPath="${targetPath}/vector-gplay-arm64-v8a-release-signed.apk"
|
|
adb -d install ${apkPath}
|
|
|
|
read -p "Please run the APK on your phone to check that the upgrade went well (no init sync, etc.). Press enter when it's done."
|
|
|
|
printf "\n================================================================================\n"
|
|
githubCreateReleaseLink="https://github.com/vector-im/element-android/releases/new?tag=v${version}&title=Element%%20Android%%20v${version}&body=${changelogUrlEncoded}"
|
|
printf "Creating the release on gitHub.\n"
|
|
printf "Open this link: ${githubCreateReleaseLink}\n"
|
|
printf "Then\n"
|
|
printf " - click on the 'Generate releases notes' button\n"
|
|
printf " - Add the 4 signed APKs to the GitHub release. They are located at ${targetPath}\n"
|
|
read -p ". Press enter when it's done. "
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Message for the Android internal room:\n\n"
|
|
message="@room Element Android ${version} is ready to be tested. You can get if from https://github.com/vector-im/element-android/releases/tag/v${version}. Please report any feedback here. Thanks!"
|
|
printf "${message}\n\n"
|
|
|
|
if [[ -z "${elementBotToken}" ]]; then
|
|
read -p "ELEMENT_BOT_MATRIX_TOKEN is not defined in the environment. Cannot send the message for you. Please send it manually, and press enter when it's done "
|
|
else
|
|
read -p "Send this message to the room (yes/no) default to yes? " doSend
|
|
doSend=${doSend:-yes}
|
|
if [ ${doSend} == "yes" ]; then
|
|
printf "Sending message...\n"
|
|
transactionId=`openssl rand -hex 16`
|
|
# Element Android internal
|
|
matrixRoomId="!LiSLXinTDCsepePiYW:matrix.org"
|
|
curl -X PUT --data $"{\"msgtype\":\"m.text\",\"body\":\"${message}\"}" -H "Authorization: Bearer ${elementBotToken}" https://matrix-client.matrix.org/_matrix/client/r0/rooms/${matrixRoomId}/send/m.room.message/\$local.${transactionId}
|
|
else
|
|
printf "Message not sent, please send it manually!\n"
|
|
fi
|
|
fi
|
|
|
|
printf "\n================================================================================\n"
|
|
printf "Congratulation! Kudos for using this script! Have a nice day!\n"
|
|
printf "================================================================================\n"
|