aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/git_hash.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh
index 6ba265e33..336eb01dd 100755
--- a/scripts/git_hash.sh
+++ b/scripts/git_hash.sh
@@ -7,7 +7,8 @@ fi
ROOTDIR=${1}
if [ -d ${ROOTDIR}/.git ]; then
- hash=$(git --git-dir=${ROOTDIR}/.git describe --match 'v?\.?\.?\.?' | tr -d "\n")
+ hash=$(git --git-dir=${ROOTDIR}/.git describe --match 'v[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*'\
+ | tr -d "\n")
if [[ $(git --git-dir=${ROOTDIR}/.git diff --shortstat 2> /dev/null \
| tail -n1) != "" ]]; then
dirty=.dirty