devops: suppport WK_CHECKOUT_PATH variable (#4617)

`WK_CHECKOUT_PATH` defines location of webkit checkout on the
file system. All browser-related scripts, like `prepare_checkout.sh` and
`export.sh` respect this environment variable on all platforms.
This commit is contained in:
Andrey Lushnikov 2020-12-07 08:42:20 -08:00 коммит произвёл GitHub
Родитель 71b7b488f4
Коммит 13e2ef1d10
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 34 добавлений и 8 удалений

Просмотреть файл

@ -61,6 +61,11 @@ elif [[ ("$1" == "webkit") || ("$1" == "webkit/") || ("$1" == "wk") ]]; then
EXPORT_PATH="$PWD/webkit"
BUILD_NUMBER_UPSTREAM_URL="https://raw.githubusercontent.com/microsoft/playwright/master/browser_patches/webkit/BUILD_NUMBER"
source "./webkit/UPSTREAM_CONFIG.sh"
if [[ ! -z "${WK_CHECKOUT_PATH}" ]]; then
echo "WARNING: using checkout path from WK_CHECKOUT_PATH env: ${WK_CHECKOUT_PATH}"
CHECKOUT_PATH="${WK_CHECKOUT_PATH}"
FRIENDLY_CHECKOUT_PATH="<WK_CHECKOUT_PATH>"
fi
else
echo ERROR: unknown browser to export - "$1"
exit 1

Просмотреть файл

@ -61,6 +61,11 @@ elif [[ ("$1" == "webkit") || ("$1" == "webkit/") || ("$1" == "wk") ]]; then
WEBKIT_EXTRA_FOLDER_PATH="$PWD/webkit/embedder/Playwright"
BUILD_NUMBER=$(head -1 "$PWD/webkit/BUILD_NUMBER")
source "./webkit/UPSTREAM_CONFIG.sh"
if [[ ! -z "${WK_CHECKOUT_PATH}" ]]; then
echo "WARNING: using checkout path from WK_CHECKOUT_PATH env: ${WK_CHECKOUT_PATH}"
CHECKOUT_PATH="${WK_CHECKOUT_PATH}"
FRIENDLY_CHECKOUT_PATH="<WK_CHECKOUT_PATH>"
fi
else
echo ERROR: unknown browser - "$1"
exit 1

Просмотреть файл

@ -29,7 +29,12 @@ if ! [[ -d $(dirname $ZIP_PATH) ]]; then
fi
main() {
cd checkout
if [[ ! -z "${WK_CHECKOUT_PATH}" ]]; then
cd "${WK_CHECKOUT_PATH}"
echo "WARNING: checkout path from WK_CHECKOUT_PATH env: ${WK_CHECKOUT_PATH}"
else
cd "checkout"
fi
set -x
if [[ "$(uname)" == "Darwin" ]]; then

Просмотреть файл

@ -34,11 +34,16 @@ ensure_linux_deps() {
yes | DEBIAN_FRONTEND=noninteractive WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK ./Tools/Scripts/update-webkitgtk-libs
}
if [[ "$(uname)" == "Darwin" ]]; then
if [[ ! -z "${WK_CHECKOUT_PATH}" ]]; then
cd "${WK_CHECKOUT_PATH}"
echo "WARNING: checkout path from WK_CHECKOUT_PATH env: ${WK_CHECKOUT_PATH}"
else
cd "checkout"
fi
if [[ "$(uname)" == "Darwin" ]]; then
./Tools/Scripts/build-webkit --release --touch-events --orientation-events
elif [[ "$(uname)" == "Linux" ]]; then
cd "checkout"
if [[ $# == 0 || (-z "$1") ]]; then
echo
echo BUILDING: GTK and WPE

Просмотреть файл

@ -1,5 +1,5 @@
set PATH=%WEBKIT_BUILD_PATH%
set WEBKIT_LIBRARIES=%~dp0checkout\WebKitLibraries\win
set WEBKIT_OUTPUTDIR=%~dp0checkout\WebKitBuild
perl %~dp0checkout\Tools\Scripts\build-webkit --wincairo --release --no-ninja --touch-events --orientation-events --dark-mode-css --generate-project-only --cmakeargs="-DLIBVPX_PACKAGE_PATH=C:\vcpkg\packages\libvpx_x64-windows"
%DEVENV% %~dp0checkout\WebKitBuild\Release\WebKit.sln /build "Release|x64"
set WEBKIT_LIBRARIES=%~dp0WebKitLibraries\win
set WEBKIT_OUTPUTDIR=%~dp0WebKitBuild
perl %~dp0Tools\Scripts\build-webkit --wincairo --release --no-ninja --touch-events --orientation-events --dark-mode-css --generate-project-only --cmakeargs="-DLIBVPX_PACKAGE_PATH=C:\vcpkg\packages\libvpx_x64-windows"
%DEVENV% %~dp0WebKitBuild\Release\WebKit.sln /build "Release|x64"

Просмотреть файл

@ -4,7 +4,13 @@ set +x
trap "cd $(pwd -P)" EXIT
cd "$(dirname $0)"
cd "checkout"
if [[ ! -z "${WK_CHECKOUT_PATH}" ]]; then
cd "${WK_CHECKOUT_PATH}"
echo "WARNING: checkout path from WK_CHECKOUT_PATH env: ${WK_CHECKOUT_PATH}"
else
cd "checkout"
fi
if [[ -d ./WebKitBuild ]]; then
rm -rf ./WebKitBuild/Release