Skip to content
Snippets Groups Projects
Commit d85c496f authored by Kamil Dudka's avatar Kamil Dudka
Browse files

git-version-gen: use a reasonable fallback for dist tarballs

Since commit 3.11.0-36-g8612d1c logrotate reported UNKNOWN version
in case someone ran autoreconf in the directory extracted out of the
tarball produced by 'make dist'.

This commit makes autoreconf pick the version string from the suffix
of the directory where build-aux/git-version-gen runs (usually the
top-level directory).  This works reliably for sources extracted out
of the tarballs produced by 'make dist'.

Bug: https://bugzilla.redhat.com/1500264
parent a5dcee2f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -189,7 +189,8 @@ then
v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
v_from_git=1
elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
v=UNKNOWN
# fallback for tarballs produced by 'make dist' (use directory suffix)
v="`basename "$PWD" | sed 's/^[^-]*-//'`"
else
v=$fallback
fi
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment