summaryrefslogtreecommitdiff
path: root/version.sh
blob: ca09917b629a9c0325e88af1570883e670494e7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

METASTORE_PRETAG_VER=v1.0.999

cd "${0%/*}" && \
METASTORE_VER="$(\
{ git describe --tags 2>/dev/null \
  || grep -no '^v[0-9][^ ]*' NEWS \
  || echo $METASTORE_PRETAG_VER; \
} | sed '/^1:/s,,,;/:/{s,[^:]*:,,;s,$,+,};q' \
)"

echo "$METASTORE_VER_PREFIX$METASTORE_VER$METASTORE_VER_SUFFIX"