examples/git-metapull: Apply stored metadata with -e -E options.
[metastore.git] / version.sh
blob13599cc75f05c21ec27e0903e5942dfcf5c8251e
1 #!/bin/sh
3 METASTORE_PRETAG_VER=v1.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"