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)] Devices: $devices"
|
||||
|
||||
# Remove previous changes of vendor/cm, vendor/lineage and frameworks/base (if they exist)
|
||||
# TODO: maybe reset everything using https://source.android.com/setup/develop/repo#forall
|
||||
for path in "vendor/cm" "vendor/lineage" "frameworks/base" "packages/apps/PermissionController" "packages/modules/Permission"; do
|
||||
if [ -d "$path" ]; then
|
||||
cd "$path"
|
||||
git reset -q --hard
|
||||
git clean -q -fd
|
||||
cd "$SRC_DIR/$branch_dir"
|
||||
fi
|
||||
done
|
||||
if [ "$RESET_VENDOR_UNDO_PATCHES" = true ]; then
|
||||
# Remove previous changes of vendor/cm, vendor/lineage and frameworks/base (if they exist)
|
||||
# TODO: maybe reset everything using https://source.android.com/setup/develop/repo#forall
|
||||
for path in "vendor/cm" "vendor/lineage" "frameworks/base" "packages/apps/PermissionController" "packages/modules/Permission"; do
|
||||
if [ -d "$path" ]; then
|
||||
cd "$path"
|
||||
git reset -q --hard
|
||||
git clean -q -fd
|
||||
cd "$SRC_DIR/$branch_dir"
|
||||
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"
|
||||
if [ "$LOCAL_MIRROR" = true ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user