From b3d578d6b831972c4aa7e6dd3a7429347a0e5bd0 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 15 Dec 2022 12:44:40 +0100 Subject: [PATCH] Release script: Improve creation of the release on GitHub. --- tools/release/releaseScript.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/release/releaseScript.sh b/tools/release/releaseScript.sh index 2ae4bf11aa..8273914c88 100755 --- a/tools/release/releaseScript.sh +++ b/tools/release/releaseScript.sh @@ -190,6 +190,9 @@ 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}" @@ -354,10 +357,15 @@ 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." -# TODO Get the block to copy from towncrier earlier (be may be edited by the release manager)? -read -p "Create the release on gitHub from the tag https://github.com/vector-im/element-android/tags, copy paste the block from the file CHANGES.md. Press enter when it's done." -read -p "Add the 4 signed APKs to the GitHub release. They are located at ${targetPath}. 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"