Add action to show metastore version: -v / --version.
[metastore.git] / version.sh
blob6716dff5e53a5a240522ed492aa2f381ec6f4811
1 #!/bin/sh
3 METASTORE_PRETAG_VER=1.0.999
5 cd "${0%/*}" && \
6 METASTORE_VER="$(\
7 { git describe --tags 2>/dev/null \
8 || grep -no '^v[0-9][^ ]*' NEWS \
9 || echo $METASTORE_PRETAG_VER; \
10 } | sed '/^1:/s,,,;/:/{s,[^:]*:,,;s,$,+,};q' \
13 echo "$METASTORE_VER_PREFIX$METASTORE_VER$METASTORE_VER_SUFFIX"