fix(doc): Make browser_patches/contributing.md more straightforward (#167)

This commit is contained in:
Joel Einbinder 2019-12-06 14:56:37 -08:00 коммит произвёл Yury Semikhatsky
Родитель bcb62de4b2
Коммит e727ee0c81
1 изменённых файлов: 7 добавлений и 13 удалений

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

@ -11,15 +11,16 @@ and develop from there.
From the `playwright` repo, run the following command:
```sh
$ ./browser_patches/prepare_checkout.sh firefox
$ ./browser_patches/prepare_checkout.sh firefox <path to checkout>
```
(you can optionally pass "webkit" for a webkit checkout)
If you don't have a checkout, don't pass a path and one will be created for you in `./browser_patches/firefox/checkout`
> **NOTE:** this command downloads GBs of data.
This command will:
- create a git browser checkout at `./browser_patches/firefox/checkout`
- create a `browser_upstream` remote in the checkout
- create a `playwright-build` branch and apply all playwright-required patches to it.
@ -41,7 +42,7 @@ Once you're happy with the work you did in the browser-land, you want to export
Assuming that you're in the root of the `playwright` repo and that your browser checkout has your feature branch checked out:
```sh
$ ./browser_patches/export.sh firefox
$ ./browser_patches/export.sh firefox <path to checkout>
```
This script will:
@ -49,6 +50,8 @@ This script will:
- update the `./browser_patches/firefox/UPSTREAM_CONFIG.sh` if necessary
- bump the `./browser_patches/firefox/BUILD_NUMBER` number.
If you omit the path to your checkout, the script will assume one is located at `./browser_patches/firefox/checkout`
Send a PR to the PlayWright repo to be reviewed.
## 4. Rolling PlayWright to the new browser build
@ -62,12 +65,3 @@ $ ./browser_patches/tools/check_cdn.sh
```
As the builds appear, you can roll to a new browser version in the `./package.json` file.
# FAQ
## Q: Can I reuse my other browser checkout?
Yes, you can. For this:
- pass path to your browser checkout as a second argument to `prepare_checkout.sh` script.
- pass path to your browser checkout as a second argument to `export.sh` when exporting changes.