diff options
-rw-r--r-- | configure.ac | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 1edb4d8e..1c776925 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]) |