mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 18:47:06 +00:00
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 a642a11fac
,
introducing getver.sh.
Signed-off-by: Magnus Kroken <mkroken@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
70973dd30d
commit
289f2a8ce3
@ -40,7 +40,8 @@ try_git() {
|
|||||||
REV="${UPSTREAM_REV}+$((REV - UPSTREAM_REV))"
|
REV="${UPSTREAM_REV}+$((REV - UPSTREAM_REV))"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
REV="${REV:+r$REV-$(git log --format="%h" -1)}"
|
REV="${REV:+r$REV-$(git log -n 1 --format="%h" $UPSTREAM_BASE)}"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user