From 8c4777c677ef24d6c89c8d116863faa4654d3529 Mon Sep 17 00:00:00 2001 From: Bunnaroath Sou Date: Fri, 22 Mar 2019 11:21:43 -0700 Subject: Initial internal tag 0.0.1 for FS 19.03 RC --- scripts/git-version | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 scripts/git-version (limited to 'scripts/git-version') diff --git a/scripts/git-version b/scripts/git-version new file mode 100755 index 0000000..850c19b --- /dev/null +++ b/scripts/git-version @@ -0,0 +1,21 @@ +#!/bin/bash + +version='v0.0.1' + +if test -d .git +then + gv=`git describe` + if [[ "$?" == "0" ]] + then + if [[ "$(echo "${gv}" | cut -d'-' -f1)" != "$version" ]] + then + echo "$0 has mismatched version" >&2 + echo "${gv}-ERROR" + exit 1 + fi + + version="$(echo ${gv} | cut -c2-)" + fi +fi + +echo "${version}" -- cgit v1.2.3