Use lightweight tags when generating version

GitHub tags for draft releases are lightweight tags.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-04-18 19:20:02 -06:00
parent 26a4c30947
commit f27e28dd18

View File

@@ -32,7 +32,7 @@ fi
# gitdesc extracts the closest version tag, removing the leading "v" and
# returning the rest
gitdesc() {
git describe --match='v[0-9]*' --always --candidates=1 "$@" 2>/dev/null |
git describe --tags --match='v[0-9]*' --always --candidates=1 "$@" 2>/dev/null |
sed -e 's,^v,,'
}