Archived
1
0
Fork 0

adding version information to build.

This commit is contained in:
Henrik Hautakoski 2011-06-22 00:28:32 +02:00
parent a973415f0e
commit 8531c612d3
4 changed files with 31 additions and 1 deletions

18
VERSION-GEN Executable file
View file

@ -0,0 +1,18 @@
#!/bin/sh
VERSION=$(git describe --tags --match "v[0-9]*" HEAD 2>/dev/null)
if [ -n "$(git status --porcelain)" ]; then
VERSION="${VERSION}-dirty"
fi
if [ -f "${1}" ]; then
OLD=$(cat ${1} | sed 's/VERSION = //')
else
OLD=""
fi
if [ "${VERSION}" != "${OLD}" ]; then
echo >&2 " Archived ${VERSION}"
echo "ARCHIVED_VERSION = ${VERSION}"
fi