From 687812320224e4e5de0080fdb708204891ddec84 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Sat, 4 Mar 2017 22:57:14 -0600 Subject: [PATCH] Make configure.ac work for shallow clones --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1edb4d8..1c77692 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,7 @@ -m4_define([jq_version], m4_esyscmd_s([git describe --tags --dirty --match 'jq-*'|sed 's/^jq-//'])) +m4_define([jq_version], + m4_esyscmd_s([(git rev-parse --verify -q jq-1.0 > /dev/null && + (git describe --tags --dirty --match 'jq-*'|sed 's/^jq-//')) || + echo `git rev-parse --abbrev-ref HEAD`-`git describe --always --dirty`]))) AC_INIT([jq], [jq_version], [https://github.com/stedolan/jq/issues], [jq], [https://stedolan.github.io/jq]) -- 2.40.0