scripts/image: include git shorthash in version

This commit is contained in:
Stefan Saraev 2013-12-14 23:14:59 +02:00
parent 148fb46640
commit 255f3f7266

View File

@ -35,7 +35,8 @@ BUILD_DATE=`date +%Y%m%d%H%M%S`
if [ "$OPENELEC_VERSION" = devel -o "$OPENELEC_VERSION" = debug ]; then
GIT_BUILD=$(git rev-list --count HEAD)
GIT_HASH=$(git rev-parse HEAD)
OPENELEC_VERSION=$OPENELEC_VERSION-$BUILD_DATE-r$GIT_BUILD
GIT_ABBREV=$(git log -1 --pretty=format:%h)
OPENELEC_VERSION=$OPENELEC_VERSION-$BUILD_DATE-r$GIT_BUILD-g$GIT_ABBREV
fi
TARGET_VERSION="$PROJECT.$TARGET_ARCH-$OPENELEC_VERSION"