summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2024-06-30 15:46:39 +0200
committerJörg Frings-Fürst <debian@jff.email>2024-06-30 15:46:39 +0200
commit73365252941d4053dca0e7fa06f4c205194cf1b8 (patch)
tree3eff4566f12e48cfee6b35955d262e46ee5a5da1 /autogen.sh
parent52c7d661296d9efb9a51b52c38dda22516cf981a (diff)
parent3c9b873509b5c2278d4e345bf86a22c1ff26f3c0 (diff)
Merge branch 'release/debian/1.3.0-1'debian/1.3.0-1
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
index 14febbb..53ead19 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -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)