This moves default Firefox and WebKit checkouts to $HOME folder,
unless browser specific env variables are specified.
In other words:
- Firefox checkouts goes to `$HOME/firefox` unless there's a
`$FF_CHECKOUT_PATH` that specifies a custom location.
- WebKit checkout goes to `$HOME/webkit` unless there's a
`$WK_CHECKOUT_PATH` that specifies a custom location.
With this change, all build bots will now re-use checkouts
between builds, which should speed up compilation.
This way bash won't expand and post-process variable values in any way.
The changes are driven with
[`shellcheck`](https://github.com/koalaman/shellcheck)
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
```
This adds a firefox-stable application to build on our bots.
This is basically a rebaselined version of 66541552d0
The firefox base revision is bb9bf7e886
Which is taken from `about://buildconfig` of a stable Firefox version
on Mac as of Apr 9, 2021.
References #5993
`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.
**Preamble**
1. We're trying to setup a windows-based github self-hosted runner in the
playwright-internal repo.
1. Commands on Windows are mandated to have total arguments length
less then 32767 characters.
1. On windows, github self-hosted runner framework puts repository
checkout at `c:\w\playwright-internal\playwright-internal`
1. Our scripts create a checkout at
`c:\w\playwright-internal\playwright-internal\browser_patches\firefox\checkout`
1. One of the scripts in Firefox buildsystem tries to execute a command,
passing lots of absolute paths to various webidl's
1. The command fails due to restriction in (2)
**Problem**
Firefox build fails since checkout is deeply nested and hits max arg
size on windows.
**Solution**
This patch introduces a new variable `FF_CHECKOUT_PATH` that is
respected by all browser-related scripts. This way we'll be able
to checkout firefox to `c:\firefox` and avoid hitting long arguments
limit.
Currently, it might happen that two different patches clash for the
same build number for the browsers. In this case, authors might
not even know that they need to rebaseline.
This patch starts adding a second line to `BUILD_NUMBER` files - the
signature and date of the `BUILD_NUMBER` change. These are guaranteed
to clash, so it should not be possible to land patches without
re-baselining them.
This changes `export.sh` to export diffs instead of patches.
`export.sh` now does not touch working directory, thus not
triggering clean builds and not intefering with an on-going
build.
Turns out `git rmeote get-url` resolves the `insteadOf` substitutions
and ends up with a different URL.
This patch bypasses these substitutions to properly validate
remote url.