devops: fix WebKit build on MacOS 12 (#13907)

WebKit build creates an empty folder `./Tools/Playwright/Playwright.xcodeproj/project.xcworkspace/xcshareddata/swiftpm`

To workaround this, let's remove the embedder folder when
preparing browser checkout.
This commit is contained in:
Andrey Lushnikov 2022-05-03 13:45:26 -06:00 committed by GitHub
parent 0baf74d016
commit 0901588ed2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -238,9 +238,11 @@ if [[ ! -z "${WEBKIT_EXTRA_FOLDER_PATH}" ]]; then
echo "-- adding WebKit embedders"
EMBEDDER_DIR="$PWD/Tools/Playwright"
# git status does not show empty directories, check it separately.
# XCode 13 and WebKit build on MacOS 12 now create empty folder here:
# ./Tools/Playwright/Playwright.xcodeproj/project.xcworkspace/xcshareddata/swiftpm
# As an easy work-around, let's remove it.
if [[ -d $EMBEDDER_DIR ]]; then
echo "ERROR: $EMBEDDER_DIR already exists! Remove it and re-run the script."
exit 1
rm -rf "$EMBEDDER_DIR"
fi
cp -r "${WEBKIT_EXTRA_FOLDER_PATH}" "$EMBEDDER_DIR"
git add "$EMBEDDER_DIR"
@ -248,9 +250,9 @@ elif [[ ! -z "${FIREFOX_EXTRA_FOLDER_PATH}" ]]; then
echo "-- adding juggler"
EMBEDDER_DIR="$PWD/juggler"
# git status does not show empty directories, check it separately.
# Remove for good if its empty but exists.
if [[ -d $EMBEDDER_DIR ]]; then
echo "ERROR: $EMBEDDER_DIR already exists! Remove it and re-run the script."
exit 1
rm -rf "$EMBEDDER_DIR"
fi
cp -r "${FIREFOX_EXTRA_FOLDER_PATH}" "$EMBEDDER_DIR"
git add "$EMBEDDER_DIR"