Skip to content

Commit 77c1020

Browse files
authored
devops: re-use firefox checkout for firefox-stable (#6410)
Every patch to Firefox should also go to firefox-stable. This patch starts re-using Firefox-beta checkout for firefox-stable, making possible to easily rebaseline work atop of firefox-stable. With this patch, working on a patch in Firefox is a 2-step process: 1. work on a patch against Firefox-Beta 2. rebaseline your work atop of Firefox-Stable Working on Firefox-Beta is as usual: - setup an up-to-date firefox checkout: ```sh $ ./browser_patches/prepare_checkout.sh firefox ``` - create a new branch for your firefox work off `playwright-build`: ```sh $ cd ./browser_patches/firefox/checkout $ git checkout -b my-feature ``` - once work is done, export your branch: ```sh $ ./browser_patches/export.sh firefox ``` Rebaselining your work for Firefox-Stable takes advantage of a single checkout: - prepare a firefox-stable checkout: ```sh $ ./browser_patches/prepare_checkout.sh ff-stable ``` - rebaseline your feature branch atop of stable: ```sh $ cd ./browser_patches/firefox/checkout $ git checkout my-feature $ git rebase -i playwright-build ``` - make sure firefox-stable compiles: ```sh $ ./browser_patches/firefox-stable/build.sh ``` - export firefox-stable: ```sh $ ./browser_patches/export.sh ff-stable ```
1 parent 5c51961 commit 77c1020

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

browser_patches/export.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,11 @@ if [[ ("$1" == "firefox") || ("$1" == "firefox/") || ("$1" == "ff") ]]; then
5353
CHECKOUT_PATH="${FF_CHECKOUT_PATH}"
5454
FRIENDLY_CHECKOUT_PATH="<FF_CHECKOUT_PATH>"
5555
fi
56-
elif [[ ("$1" == "firefox-stable") ]]; then
57-
FRIENDLY_CHECKOUT_PATH="//browser_patches/firefox-stable/checkout";
58-
CHECKOUT_PATH="$PWD/firefox-stable/checkout"
56+
elif [[ ("$1" == "firefox-stable") || ("$1" == "ff-stable") ]]; then
57+
# NOTE: firefox-stable re-uses firefox checkout.
58+
FRIENDLY_CHECKOUT_PATH="//browser_patches/firefox/checkout";
59+
CHECKOUT_PATH="$PWD/firefox/checkout"
60+
5961
EXTRA_FOLDER_PW_PATH="$PWD/firefox-stable/juggler"
6062
EXTRA_FOLDER_CHECKOUT_RELPATH="juggler"
6163
EXPORT_PATH="$PWD/firefox-stable"

browser_patches/firefox-stable/archive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if [[ ! -z "${FF_CHECKOUT_PATH}" ]]; then
3636
cd "${FF_CHECKOUT_PATH}"
3737
echo "WARNING: checkout path from FF_CHECKOUT_PATH env: ${FF_CHECKOUT_PATH}"
3838
else
39-
cd "checkout"
39+
cd "../firefox/checkout"
4040
fi
4141

4242
OBJ_FOLDER="obj-build-playwright"

browser_patches/firefox-stable/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if [[ ! -z "${FF_CHECKOUT_PATH}" ]]; then
1818
cd "${FF_CHECKOUT_PATH}"
1919
echo "WARNING: checkout path from FF_CHECKOUT_PATH env: ${FF_CHECKOUT_PATH}"
2020
else
21-
cd "checkout"
21+
cd "../firefox/checkout"
2222
fi
2323

2424
rm -rf .mozconfig

browser_patches/firefox-stable/clean.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if [[ ! -z "${FF_CHECKOUT_PATH}" ]]; then
88
echo "WARNING: checkout path from FF_CHECKOUT_PATH env: ${FF_CHECKOUT_PATH}"
99
else
1010
cd "$(dirname $0)"
11-
cd "checkout"
11+
cd "../firefox/checkout"
1212
fi
1313

1414
OBJ_FOLDER="obj-build-playwright"

browser_patches/prepare_checkout.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@ elif [[ ("$1" == "firefox") || ("$1" == "firefox/") || ("$1" == "ff") ]]; then
9393
CHECKOUT_PATH="${FF_CHECKOUT_PATH}"
9494
FRIENDLY_CHECKOUT_PATH="<FF_CHECKOUT_PATH>"
9595
fi
96-
elif [[ ("$1" == "firefox-stable") ]]; then
97-
FRIENDLY_CHECKOUT_PATH="//browser_patches/firefox-stable/checkout";
98-
CHECKOUT_PATH="$PWD/firefox-stable/checkout"
96+
elif [[ ("$1" == "firefox-stable") || ("$1" == "ff-stable") ]]; then
97+
# NOTE: firefox-stable re-uses firefox checkout.
98+
FRIENDLY_CHECKOUT_PATH="//browser_patches/firefox/checkout";
99+
CHECKOUT_PATH="$PWD/firefox/checkout"
100+
99101
PATCHES_PATH="$PWD/firefox-stable/patches"
100102
FIREFOX_EXTRA_FOLDER_PATH="$PWD/firefox-stable/juggler"
101103
BUILD_NUMBER=$(head -1 "$PWD/firefox-stable/BUILD_NUMBER")
@@ -236,7 +238,7 @@ elif [[ ! -z "${FIREFOX_EXTRA_FOLDER_PATH}" ]]; then
236238
git add $EMBEDDER_DIR
237239
fi
238240

239-
git commit -a --author="playwright-devops <[email protected]>" -m "chore: bootstrap build #$BUILD_NUMBER"
241+
git commit -a --author="playwright-devops <[email protected]>" -m "chore($1): bootstrap build #$BUILD_NUMBER"
240242

241243
echo
242244
echo

0 commit comments

Comments
 (0)