aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMagnus Kroken <mkroken@gmail.com>2017-01-14 22:34:01 +0100
committerJo-Philipp Wich <jo@mein.io>2017-03-01 20:37:35 +0100
commit4bd0edc8fdbb8c02c71dacdfc2d6ebef3716eda5 (patch)
tree88f7758497084bd4398f7bc3e1a4ff49d9d895a4 /scripts
parent9451cd7c5b6ccce9e790159fb8d71b054fa8325f (diff)
downloadupstream-4bd0edc8fdbb8c02c71dacdfc2d6ebef3716eda5.tar.gz
upstream-4bd0edc8fdbb8c02c71dacdfc2d6ebef3716eda5.tar.bz2
upstream-4bd0edc8fdbb8c02c71dacdfc2d6ebef3716eda5.zip
scripts/getver.sh: append short git hash based on upstream commit
The short git hash suffix printed by getver.sh is taken from the latest local commit, change this to use the hash from latest upstream commit if available. This is considered the intended behavior based on commit message a642a11faca87e2a7bddc1fadb54253e2fc26e84, introducing getver.sh. Signed-off-by: Magnus Kroken <mkroken@gmail.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/getver.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/getver.sh b/scripts/getver.sh
index ecf048f4c1..9175f411db 100755
--- a/scripts/getver.sh
+++ b/scripts/getver.sh
@@ -40,7 +40,8 @@ try_git() {
REV="${UPSTREAM_REV}+$((REV - UPSTREAM_REV))"
fi
- REV="${REV:+r$REV-$(git log --format="%h" -1)}"
+ REV="${REV:+r$REV-$(git log -n 1 --format="%h" $UPSTREAM_BASE)}"
+
;;
esac