AppImage: fix handling of revision that are tags

For a tag such as "release-28.0.0", `git describe --tags` won't append
a commit number suffix.
This commit is contained in:
Moritz Bunkus 2018-10-23 22:19:07 +02:00
parent 2371689bac
commit c853050594
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85

View File

@ -88,6 +88,9 @@ NO_GLIBC_VERSION=1
if [[ ( -d .git ) && ( $RELEASE_VERSION == 0 ) ]]; then
VERSION="$(git describe --tags | sed -e 's/release-//')"
if [[ $VERSION != *-*-* ]]; then
VERSION=${VERSION}-0
fi
NUM=${VERSION%-*}
NUM=${NUM##*-}
VERSION="${VERSION%%-*}-revision-$(printf '%03d' ${NUM})-${VERSION##*-}"