Skip to content
Snippets Groups Projects
Commit 575be9d1 authored by Jonas Gorski's avatar Jonas Gorski
Browse files

scripts/getver.sh: simplify revision calculation


Use git rev-list --count to get the revision number.

Signed-off-by: default avatarJonas Gorski <jonas.gorski@gmail.com>
parent c729fe02
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ try_version() { ...@@ -11,7 +11,7 @@ try_version() {
try_git() { try_git() {
git rev-parse --git-dir >/dev/null 2>&1 || return 1 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}" REV="${REV:+r$REV}"
[ -n "$REV" ] [ -n "$REV" ]
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment