diff --git a/Dockerfile b/Dockerfile index fde2d8caacdb06421bfb5e1217a5458f04389a5f..37386baef40330060e186de4a338954a5851ee65 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 8dab1356de818e8069b3c4eac82e69bacc47a7ea..dd3ebc71739a5de3bdf2984caac0a2595b4dc633 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"