Skip to content

Commit b3d578d

Browse files
committed
Release script: Improve creation of the release on GitHub.
1 parent 5e1d3e6 commit b3d578d

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

tools/release/releaseScript.sh

+11-3
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ yes | towncrier build --version "v${version}"
190190
printf "\n================================================================================\n"
191191
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."
192192

193+
# Get the changes to use it to create the GitHub release
194+
changelogUrlEncoded=`git diff CHANGES.md | grep ^+ | tail -n +2 | cut -c2- | jq -sRr @uri | sed s/\(/%28/g | sed s/\)/%29/g`
195+
193196
printf "\n================================================================================\n"
194197
printf "Committing...\n"
195198
git commit -a -m "Changelog for version ${version}"
@@ -354,10 +357,15 @@ apkPath="${targetPath}/vector-gplay-arm64-v8a-release-signed.apk"
354357
adb -d install ${apkPath}
355358

356359
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."
357-
# TODO Get the block to copy from towncrier earlier (be may be edited by the release manager)?
358-
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."
359360

360-
read -p "Add the 4 signed APKs to the GitHub release. They are located at ${targetPath}. Press enter when it's done."
361+
printf "\n================================================================================\n"
362+
githubCreateReleaseLink="https://github.com/vector-im/element-android/releases/new?tag=v${version}&title=Element%%20Android%%20v${version}&body=${changelogUrlEncoded}"
363+
printf "Creating the release on gitHub.\n"
364+
printf "Open this link: ${githubCreateReleaseLink}\n"
365+
printf "Then\n"
366+
printf " - click on the 'Generate releases notes' button\n"
367+
printf " - Add the 4 signed APKs to the GitHub release. They are located at ${targetPath}\n"
368+
read -p ". Press enter when it's done. "
361369

362370
printf "\n================================================================================\n"
363371
printf "Message for the Android internal room:\n\n"

0 commit comments

Comments
 (0)