From fa0f110fac93fa51d08a8d3b05195c661babe21a Mon Sep 17 00:00:00 2001 From: Yamil Ghazi Date: Mon, 13 Jan 2014 06:14:54 -0600 Subject: [PATCH] Show version tag when building Change-Id: I6e202614c69a53420bcd91b13cd1d6296e1d960b --- build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index bbbc0aec..12febe9a 100755 --- a/build.sh +++ b/build.sh @@ -43,8 +43,13 @@ EXTRAS="$2" MAJOR=$(cat $DIR/vendor/pa/vendor.mk | grep 'ROM_VERSION_MAJOR := *' | sed 's/ROM_VERSION_MAJOR := //g') MINOR=$(cat $DIR/vendor/pa/vendor.mk | grep 'ROM_VERSION_MINOR := *' | sed 's/ROM_VERSION_MINOR := //g') MAINTENANCE=$(cat $DIR/vendor/pa/vendor.mk | grep 'ROM_VERSION_MAINTENANCE := *' | sed 's/ROM_VERSION_MAINTENANCE := //g') +TAG=$(cat $DIR/vendor/pa/vendor.mk | grep 'ROM_VERSION_TAG := *' | sed 's/ROM_VERSION_TAG := //g') -VERSION=$MAJOR.$MINOR$MAINTENANCE +if [ -n "$TAG" ]; then + VERSION=$MAJOR.$MINOR$MAINTENANCE-$TAG +else + VERSION=$MAJOR.$MINOR$MAINTENANCE +fi # If there is no extra parameter, reduce parameters index by 1 if [ "$EXTRAS" == "true" ] || [ "$EXTRAS" == "false" ]; then