Files
stedolan-jq/scripts/version
T

11 lines
265 B
Bash
Raw Normal View History

#!/bin/sh
set -e
cd `dirname "$0"`
2017-03-03 14:28:58 -06:00
if git rev-parse --verify -q jq-1.0 > /dev/null 2>&1; then
git describe --tags --match 'jq-*' --dirty | sed 's/^jq-//'
else
b=`git rev-parse --abbrev-ref HEAD`
c=`git describe --always --dirty`
echo "${b}-${c}"
fi