aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Roxell <anders.roxell@linaro.org>2016-05-02 23:07:47 +0200
committerMike Holmes <mike.holmes@linaro.org>2016-05-03 13:43:41 -0400
commit5082355f4916ac62dee8e3a43b1777d681fec75a (patch)
treeeaf18738a0e3bd61ae10fc91016a99c753376a70
parentc648782cfcc84111557609c59124521e3e05d5e9 (diff)
scripts/git_hash: match more digits
Make it possible to match more digits than groups of one. Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Ricardo Salveti <ricardo.salveti@linaro.org> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
-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 6ba265e3..336eb01d 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