summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2016-12-02 12:07:19 +0100
committerJo-Philipp Wich <jo@mein.io>2016-12-02 16:38:55 +0100
commita642a11faca87e2a7bddc1fadb54253e2fc26e84 (patch)
tree1f44b79dc5c97ec7d7b7ec4a634b5579cf7dece2 /scripts
parent5f3c96c28503b8a0aad1514ef144b15e670d338b (diff)
downloadmtk-20170518-a642a11faca87e2a7bddc1fadb54253e2fc26e84.zip
mtk-20170518-a642a11faca87e2a7bddc1fadb54253e2fc26e84.tar.gz
mtk-20170518-a642a11faca87e2a7bddc1fadb54253e2fc26e84.tar.bz2
scripts: getver.sh: append Git short hash to revision
Change getver.sh to append a short Git commit hash to the end of the artifical revision number. This way we still have order- and comparable commit numbers but also a direct relation to the Git commit. The new output format will look like "r2400+2-882472e" for dirty trees or like "r2402-882472e" for clean ones. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/getver.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/getver.sh b/scripts/getver.sh
index d5f2986..ecf048f 100755
--- a/scripts/getver.sh
+++ b/scripts/getver.sh
@@ -40,7 +40,7 @@ try_git() {
REV="${UPSTREAM_REV}+$((REV - UPSTREAM_REV))"
fi
- REV="${REV:+r$REV}"
+ REV="${REV:+r$REV-$(git log --format="%h" -1)}"
;;
esac