summaryrefslogtreecommitdiff
path: root/version.sh
blob: 13599cc75f05c21ec27e0903e5942dfcf5c8251e (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"