From f27108a4b114c9d83de25d2beba5c7c0a1d1c20b Mon Sep 17 00:00:00 2001 From: Przemyslaw Pawelczyk Date: Tue, 1 Dec 2015 01:44:21 +0100 Subject: Add action to show metastore version: -v / --version. Fixes #36. --- version.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 version.sh (limited to 'version.sh') diff --git a/version.sh b/version.sh new file mode 100755 index 0000000..6716dff --- /dev/null +++ b/version.sh @@ -0,0 +1,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" -- cgit v1.2.1