diff --git a/build.sh b/build.sh index 6d3b8bb1..377ec18b 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