From 10bbe57456c00b4449e1e434b059efd2ad99fd4f Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Fri, 22 Dec 2023 16:01:39 +0000 Subject: [PATCH] introducing KEEP_LOCAL_MANIFEST_BRANCH --- Dockerfile | 3 +++ src/build.sh | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fde2d8c..37386ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,9 @@ ENV CCACHE_EXEC /usr/bin/ccache # See https://github.com/LineageOS/android_vendor_cm/branches for possible options ENV BRANCH_NAME 'v1-q' +# When true, muppets manifests will keep BRANCH_NAME as branch instead of getting its lineage equivalent +ENV KEEP_LOCAL_MANIFEST_BRANCH 'false' + # Environment for the device # eg. DEVICE=hammerhead ENV DEVICE '' diff --git a/src/build.sh b/src/build.sh index 8dab135..dd3ebc7 100755 --- a/src/build.sh +++ b/src/build.sh @@ -41,7 +41,6 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then vendor=lineage regex_part1="^v[0-9](\.[0-9]*){0,2}(-(beta|alpha|rc)(\.[0-9]*){0,1}){0,1}-(" regex_part2=")(-[a-zA-Z0-9_]*)*$" - if [[ "${BRANCH_NAME}" =~ $regex_part1"nougat"$regex_part2 ]]; then vendor="cm" themuppets_branch="cm-14.1" @@ -71,6 +70,10 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then exit 1 fi + if [[ "${KEEP_LOCAL_MANIFEST_BRANCH}" = true ]]; then + themuppets_branch=$BRANCH_NAME + fi + android_version_major=$(cut -d '.' -f 1 <<< $android_version) mkdir -p "$SRC_DIR/$branch_dir" -- GitLab