From 35721e31692a996cbf1cc415711b7d76ef2818d7 Mon Sep 17 00:00:00 2001 From: Romain Hunault Date: Fri, 8 Apr 2022 12:33:16 +0200 Subject: [PATCH] Handle properly branch name policy based on semantic versionning https://gitlab.e.foundation/teams/os-team/workshop/-/issues/38 https://gitlab.e.foundation/e/os/backlog/-/issues/184 --- src/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/build.sh b/src/build.sh index c4868c8..459e449 100755 --- a/src/build.sh +++ b/src/build.sh @@ -34,7 +34,7 @@ fi sync_successful=true use_openjdk_from_ubuntu=false -branch_dir=$(sed 's/.*-\([a-zA-Z]*\)$/\1/' <<< "${BRANCH_NAME}") +branch_dir=$(sed -E 's/^v[0-9](\.[0-9]*){0,2}(-(beta|alpha|rc)(\.[0-9]*){0,1}){0,1}-(nougat|oreo|pie|q|r)(-[a-zA-Z0-9_]*)*$/\5/' <<< "${BRANCH_NAME}") branch_dir=${branch_dir^^} if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then @@ -140,7 +140,7 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then if [ "$sync_successful" = true ]; then repo forall -c 'git lfs pull' fi - + if [ ! -d "vendor/$vendor" ]; then echo ">> [$(date)] Missing \"vendor/$vendor\", aborting" -- GitLab