Update snapcraft.yaml

This commit is contained in:
Laurent Trinques 2024-05-05 16:30:12 +02:00 committed by GitHub
parent 3479b98242
commit 78005f812a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -96,7 +96,7 @@ parts:
- git
- libsqlite3-dev
override-build: |
displayed_version=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g')
displayed_version=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
snap_version="${displayed_version}-g$(git rev-parse --short=8 HEAD)"
modified_displayed_version="${snap_version}.snap"
sed -i -E "s|const QString displayedVersion =.*|const QString displayedVersion =\"$modified_displayed_version\";|" sources/qet.h