From dab4d641ee297512c9e1c50586dd853103868cd5 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Fri, 13 Oct 2023 16:50:57 -0500 Subject: [PATCH] Add last resort version string in scripts/version --- scripts/version | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/version b/scripts/version index ba59e6b6aa..3af3626ead 100755 --- a/scripts/version +++ b/scripts/version @@ -2,7 +2,15 @@ set -eu cd "$(dirname "$0")/../" -test -d .git || exit 1 +if ! [ -d .git ]; then + # Building from default GitHub tarball, or building from dist after running + # autoreconf unnecessarily. This is something we can fail to update, but + # it's been generating a lot of questions. + # + # Now we'll have to make `Release jq-` commits that change this: + echo "jq-1.7-misconfigured" + exit 0 +fi if git describe --tags --match 'jq-*' >/dev/null 2>&1; then git describe --tags --match 'jq-*' --dirty | sed 's/^jq-//'