scripts/image: fix version string for release

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2010-12-19 11:08:13 +01:00
parent 467fe2e90d
commit 6049c9cde9
2 changed files with 9 additions and 2 deletions

View File

@ -106,8 +106,10 @@ add_group() {
}
get_version() {
BUILD_DATE=`date +%Y%m%d`
if [ "$OPENELEC_VERSION" = devel -o "$OPENELEC_VERSION" = debug ]; then
BUILD_DATE=`date +%Y%m%d`
GIT_BUILD=`git log --pretty=format:'' | wc -l`
OPENELEC_VERSION=$OPENELEC_VERSION-$BUILD_DATE-r$GIT_BUILD
fi

View File

@ -42,9 +42,14 @@ mkdir -p $INSTALL
echo "$DISTRONAME" > $INSTALL/etc/distribution
echo "$PROJECT.$TARGET_ARCH" > $INSTALL/etc/arch
echo "$OPENELEC_VERSION" > $INSTALL/etc/version
echo "$DISTRONAME - Date of build: $BUILD_DATE Build: $GIT_BUILD" > $INSTALL/etc/openelec-release
echo "$TARGET_VERSION" > $INSTALL/etc/release
if [ "$OPENELEC_VERSION" = devel -o "$OPENELEC_VERSION" = debug ]; then
echo "$DISTRONAME - Date of build: $BUILD_DATE Build: $GIT_BUILD" > $INSTALL/etc/openelec-release
else
echo "$DISTRONAME - Date of build: $BUILD_DATE Version: $OPENELEC_VERSION" > $INSTALL/etc/openelec-release
fi
# copy project related files to filesystem
if [ -d "$PROJECT_DIR/$PROJECT/filesystem" ]; then
cp -PR $PROJECT_DIR/$PROJECT/filesystem/* $INSTALL