mirror of
https://github.com/stedolan/jq.git
synced 2024-05-11 05:55:39 +00:00
Fail quickly if not in git repository in scripts/version
This commit is contained in:
@ -1,7 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")/../"
|
||||||
|
test -d .git || exit 1
|
||||||
|
|
||||||
if git describe --tags --match 'jq-*' >/dev/null 2>&1; then
|
if git describe --tags --match 'jq-*' >/dev/null 2>&1; then
|
||||||
git describe --tags --match 'jq-*' --dirty | sed 's/^jq-//'
|
git describe --tags --match 'jq-*' --dirty | sed 's/^jq-//'
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user