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

METASTORE_PRETAG_VER=1.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"