projects
/
openwrt
/
staging
/
stintel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c729fe0
)
scripts/getver.sh: simplify revision calculation
author
Jonas Gorski
<jonas.gorski@gmail.com>
Sat, 4 Jun 2016 16:35:21 +0000
(18:35 +0200)
committer
Jonas Gorski
<jonas.gorski@gmail.com>
Sat, 9 Jul 2016 11:41:28 +0000
(13:41 +0200)
Use git rev-list --count to get the revision number.
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
scripts/getver.sh
patch
|
blob
|
history
diff --git
a/scripts/getver.sh
b/scripts/getver.sh
index d0916713ad92a7a6f915fa5a281f3155bbfd5456..340ed6862cf7cc566262ea64bfdc33196926fc4d 100755
(executable)
--- 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" ]
}