diff options
author | Jonas Gorski <jonas.gorski@gmail.com> | 2016-06-04 18:35:21 +0200 |
---|---|---|
committer | Jonas Gorski <jonas.gorski@gmail.com> | 2016-07-09 13:41:28 +0200 |
commit | 575be9d18259560b40039ee0e4bf6d6ce109fca6 (patch) | |
tree | 0936a8d840a37530a3d89c1de195189fcc6e4cce /scripts | |
parent | c729fe02694a583d38ef6636837fce4b4b6fa8e8 (diff) | |
download | upstream-575be9d18259560b40039ee0e4bf6d6ce109fca6.tar.gz upstream-575be9d18259560b40039ee0e4bf6d6ce109fca6.tar.bz2 upstream-575be9d18259560b40039ee0e4bf6d6ce109fca6.zip |
scripts/getver.sh: simplify revision calculation
Use git rev-list --count to get the revision number.
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/getver.sh | 2 |
1 files changed, 1 insertions, 1 deletions
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" ] } |