[ci][desktop] Ensure that latest version is present in changelog

Signed-off-by: Francesco Gazzetta <fgaz@fgaz.me>
This commit is contained in:
Francesco Gazzetta 2022-06-29 11:04:27 +02:00
parent 9a66b6e3aa
commit 577c8e239e

View file

@ -171,3 +171,19 @@ jobs:
- name: Validate appstream data
shell: bash
run: flatpak run org.freedesktop.appstream-glib validate --nonet qt/res/app.organicmaps.desktop.metainfo.xml
- name: Ensure that latest version is present in changelog
shell: bash
run: |
version_regex='version: *(.*)-FDroid'
version_file='android/src/fdroid/play/version.yaml'
if [[ "$(cat $version_file)" =~ $regex ]]; then
version="${BASH_REMATCH[1]}"
if ! grep "release version=\"$version\"" 'qt/res/app.organicmaps.desktop.metainfo.xml'; then
echo "Changelog for version '$version' not found in '$version_file'."
exit 1
fi
else
echo "Failed to find current version from '$version_file' with regex '$version_regex'."
exit 1
fi