vendor: build: allow to set x.z versions

Change-Id: I66ddebbdc85eb75d363a1ddebfee00ce534c9954
Signed-off-by: Hernán Castañón Álvarez <herna@paranoidandroid.co>
This commit is contained in:
Hernán Castañón Álvarez 2023-07-18 23:28:58 +02:00 committed by Hernán Castañón
parent 6eed084831
commit 5632c76496
1 changed files with 4 additions and 4 deletions

View File

@ -119,11 +119,11 @@ fi
# Setup AOSPA version if specified # Setup AOSPA version if specified
if [ $AOSPA_USER_VERSION ]; then if [ $AOSPA_USER_VERSION ]; then
# Check is it a number # Check if it is a number
if [ ! -z "${AOSPA_USER_VERSION##*[!0-9]*}" ]; then if [[ $AOSPA_USER_VERSION =~ ^[0-9]+(\.[0-9]+)?$ ]]; then
export AOSPA_BUILDVERSION=${AOSPA_USER_VERSION} export AOSPA_BUILDVERSION=$AOSPA_USER_VERSION
else else
echo -e "${CLR_BLD_RED} Invalid AOSPA minor version - use any non-negative integer${CLR_RST}" echo -e "${CLR_BLD_RED}Invalid AOSPA version - use any non-negative number${CLR_RST}"
exit 1 exit 1
fi fi
fi fi