mirror of
https://github.com/lineageos4microg/docker-lineage-cicd
synced 2024-11-09 10:09:56 +01:00
Make reset vendor & undo patches switchable
This commit is contained in:
parent
3a477c2394
commit
377f2af5af
24
src/build.sh
24
src/build.sh
@ -172,16 +172,20 @@ for branch in ${BRANCH_NAME//,/ }; do
|
|||||||
echo ">> [$(date)] Branch: $branch"
|
echo ">> [$(date)] Branch: $branch"
|
||||||
echo ">> [$(date)] Devices: $devices"
|
echo ">> [$(date)] Devices: $devices"
|
||||||
|
|
||||||
# Remove previous changes of vendor/cm, vendor/lineage and frameworks/base (if they exist)
|
if [ "$RESET_VENDOR_UNDO_PATCHES" = true ]; then
|
||||||
# TODO: maybe reset everything using https://source.android.com/setup/develop/repo#forall
|
# Remove previous changes of vendor/cm, vendor/lineage and frameworks/base (if they exist)
|
||||||
for path in "vendor/cm" "vendor/lineage" "frameworks/base" "packages/apps/PermissionController" "packages/modules/Permission"; do
|
# TODO: maybe reset everything using https://source.android.com/setup/develop/repo#forall
|
||||||
if [ -d "$path" ]; then
|
for path in "vendor/cm" "vendor/lineage" "frameworks/base" "packages/apps/PermissionController" "packages/modules/Permission"; do
|
||||||
cd "$path"
|
if [ -d "$path" ]; then
|
||||||
git reset -q --hard
|
cd "$path"
|
||||||
git clean -q -fd
|
git reset -q --hard
|
||||||
cd "$SRC_DIR/$branch_dir"
|
git clean -q -fd
|
||||||
fi
|
cd "$SRC_DIR/$branch_dir"
|
||||||
done
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo ">> [$(date)] Resetting vendor and undoing patches disabled" | tee -a "$repo_log"
|
||||||
|
fi
|
||||||
|
|
||||||
echo ">> [$(date)] (Re)initializing branch repository" | tee -a "$repo_log"
|
echo ">> [$(date)] (Re)initializing branch repository" | tee -a "$repo_log"
|
||||||
if [ "$LOCAL_MIRROR" = true ]; then
|
if [ "$LOCAL_MIRROR" = true ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user