diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-03-03 09:54:51 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-03-03 09:54:51 +0100 |
commit | 44916ca6d75e0b5f258a098a50d659f31c6625fd (patch) | |
tree | 2e51a12ae43b3def9e55d3f2c9ca60d2032ad45c /autogen.sh | |
parent | 84357741a6a6e6430f199b2c3f7498e0e97da9ad (diff) |
New upstream version 1.3.0upstream/1.3.0
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -2,6 +2,20 @@ test -n "$srcdir" || srcdir=`dirname "$0"` test -n "$srcdir" || srcdir=. +# When repos are forked on GitLab tags aren't copied thus making +# git-version-gen producing incorrect version ("UNKNOWN") which in turn causes +# CI build failures. To workaround this reconstruct version from ChangeLogs +# files (handy updated on every release). If git describe is not working and we +# are not in dist package - take version from the top-most ChangeLog file. +if [ ! -e .tarball-version ] && + ! git describe >/dev/null 2>&1; then + ls ChangeLogs \ + | sort -Vr \ + | grep -m1 -P -o '(?<=ChangeLog-).*' > .tarball-version + read v < .tarball-version + echo >&2 "Package version reconstructed from ChangeLog: $v" +fi + patchdir="$srcdir/patches" # Suppress warnings about obsolete macros if still needed (#122) |