snap: Ensure version reflects Github release ver

This commit is contained in:
Carlos Hernandez 2020-09-06 05:42:47 +00:00
parent a7d48cb960
commit 8efebda2c6
No known key found for this signature in database
GPG Key ID: DF2BC08DD960FF47

View File

@ -36,7 +36,12 @@ parts:
version_prefix="v$major.$minor.$patch"
git_described="$(git describe --first-parent --dirty 2> /dev/null | perl -lpe 's/v\d.\d.\d-//g')"
git_described="${git_described:-$(git describe --first-parent --tags --always --dirty)}"
snapcraftctl set-version "${version_prefix}-${git_described}"
if [ "${version_prefix}" != "${git_described}" ]; then
VERSION="${version_prefix}-${git_described}-${branch}"
else
VERSION="${version_prefix}-${branch}"
fi
snapcraftctl set-version "${VERSION}"
plugin: make
make-parameters:
- CMAKE_BUILD_TYPE=RelWithDebInfo