2013-05-24 23:34:34 +01:00
|
|
|
#!/bin/sh
|
2023-06-14 07:33:25 +09:00
|
|
|
set -eu
|
|
|
|
|
|
2023-07-20 23:12:41 +09:00
|
|
|
cd "$(dirname "$0")/../"
|
2025-01-25 09:10:05 +01:00
|
|
|
test -e .git || exit 1
|
2023-07-20 23:12:41 +09:00
|
|
|
|
2023-06-14 07:33:25 +09:00
|
|
|
if git describe --tags --match 'jq-*' >/dev/null 2>&1; then
|
|
|
|
|
git describe --tags --match 'jq-*' --dirty | sed 's/^jq-//'
|
2017-03-03 14:28:58 -06:00
|
|
|
else
|
2023-06-14 07:33:25 +09:00
|
|
|
branch=$(git rev-parse --abbrev-ref HEAD)
|
|
|
|
|
commit=$(git describe --always --dirty)
|
|
|
|
|
echo "${branch}-${commit}"
|
2017-03-03 14:28:58 -06:00
|
|
|
fi
|