From 02214169d3c15f792cf5cee964567aa8047b040d Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Fri, 20 Mar 2020 19:03:51 -0700 Subject: [PATCH] devops: strictly configure build folder for Firefox builds This strictly defines Firefox build folder as `obj-build-playwright`. Currently, Firefox build folder encodes current Mac OS version including patch versions, and thus we might end up with multiple different build folders. --- browser_patches/firefox/archive.sh | 6 +----- browser_patches/firefox/build.sh | 8 +++++--- browser_patches/firefox/clean.sh | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/browser_patches/firefox/archive.sh b/browser_patches/firefox/archive.sh index 1f652001b7853..8b4fcb58d3a53 100755 --- a/browser_patches/firefox/archive.sh +++ b/browser_patches/firefox/archive.sh @@ -32,11 +32,7 @@ trap "cd $(pwd -P)" EXIT cd "$(dirname $0)" cd checkout -OBJ_FOLDER=$(ls -1 | grep obj-) -if [[ $OBJ_FOLDER == "" ]]; then - echo "ERROR: cannot find obj-* folder in the checkout/. Did you build?" - exit 1; -fi +OBJ_FOLDER="obj-build-playwright" ./mach package node ../install-preferences.js $PWD/$OBJ_FOLDER/dist/firefox diff --git a/browser_patches/firefox/build.sh b/browser_patches/firefox/build.sh index fe8a8793a9b38..662eadaaf3b5b 100755 --- a/browser_patches/firefox/build.sh +++ b/browser_patches/firefox/build.sh @@ -36,12 +36,14 @@ else exit 1; fi +OBJ_FOLDER="obj-build-playwright" +echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/${OBJ_FOLDER}" >> .mozconfig + ./mach build -OBJ_FOLDER=$(ls -1 | grep obj-) if [[ "$(uname)" == "Darwin" ]]; then - node ../install-preferences.js $PWD/$OBJ_FOLDER/dist + node ../install-preferences.js $PWD/${OBJ_FOLDER}/dist else - node ../install-preferences.js $PWD/$OBJ_FOLDER/dist/bin + node ../install-preferences.js $PWD/${OBJ_FOLDER}/dist/bin fi diff --git a/browser_patches/firefox/clean.sh b/browser_patches/firefox/clean.sh index 1c7b9a0581149..05c7f6e7b451f 100755 --- a/browser_patches/firefox/clean.sh +++ b/browser_patches/firefox/clean.sh @@ -6,7 +6,7 @@ trap "cd $(pwd -P)" EXIT cd "$(dirname $0)" cd "checkout" -OBJ_FOLDER=$(ls -1 | grep obj- || true) +OBJ_FOLDER="obj-build-playwright" if [[ -d $OBJ_FOLDER ]]; then rm -rf $OBJ_FOLDER fi