1
0
mirror of https://github.com/lineageos4microg/docker-lineage-cicd synced 2024-11-09 10:09:56 +01:00

ensure that build doesn't fail when SIGNATURE_SPOOFING is set but no patches are present

This commit is contained in:
Rasmus Moorats 2024-04-09 21:19:51 +03:00
parent fc017cb2ed
commit baf7001457

@ -293,8 +293,12 @@ for branch in ${BRANCH_NAME//,/ }; do
echo ">> [$(date)] WARNING: User build signature spoofing requested, but branch ($branch) does not support built-in signature spoofing"
fi
fi
# If needed, apply the microG's signature spoofing patch
if [ "$SIGNATURE_SPOOFING" = "yes" ] || [ "$SIGNATURE_SPOOFING" = "restricted" ]; then
if [ -n "$frameworks_base_patch" ]; then
echo ">> [$(date)] WARNING: Signature spoofing patches requested, but branch ($branch) does not support microG patches"
else
# Determine which patch should be applied to the current Android source tree
cd frameworks/base
if [ "$SIGNATURE_SPOOFING" = "yes" ]; then
@ -328,6 +332,7 @@ for branch in ${BRANCH_NAME//,/ }; do
mkdir -p "vendor/$vendor/overlay/microg/frameworks/base/core/res/res/values/"
cp /root/signature_spoofing_patches/frameworks_base_config.xml "vendor/$vendor/overlay/microg/frameworks/base/core/res/res/values/config.xml"
fi
fi
else
echo ">> [$(date)] Applying patches disabled"
fi