From 575be9d18259560b40039ee0e4bf6d6ce109fca6 Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Sat, 4 Jun 2016 18:35:21 +0200 Subject: [PATCH] scripts/getver.sh: simplify revision calculation Use git rev-list --count to get the revision number. Signed-off-by: Jonas Gorski --- scripts/getver.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/getver.sh b/scripts/getver.sh index d0916713ad..340ed6862c 100755 --- a/scripts/getver.sh +++ b/scripts/getver.sh @@ -11,7 +11,7 @@ try_version() { try_git() { git rev-parse --git-dir >/dev/null 2>&1 || return 1 - REV="$(git describe --match reboot | sed "s/reboot-\([0-9]*\)-.*/\1/g")" + REV="$(git rev-list reboot..HEAD --count)" REV="${REV:+r$REV}" [ -n "$REV" ] }