Skip to content
Snippets Groups Projects
Commit a642a11f authored by Jo-Philipp Wich's avatar Jo-Philipp Wich
Browse files

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: default avatarJo-Philipp Wich <jo@mein.io>
parent 5f3c96c2
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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