version: Let Git provide meaningful information

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
Quentin Glidic 2016-04-05 16:50:14 +02:00
parent b96fba1de9
commit 5f1fcf5e77
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ FILE=$2
if [ -d "${DIR}/.git/" ]
then
echo -n "#define GIT_VERSION \"" > ${FILE}.tmp
REV=$(git log -1 --pretty=tformat:%h)
REV="$(git describe --tags --always --dirty) ($(git describe --tags --always --all | sed -e 's:heads/::'))"
echo -n "${REV}" >> ${FILE}.tmp
echo "\"" >> ${FILE}.tmp
else