Skip to content

Commit ae460f0

Browse files
authored
devops: start downloading webkit fork on Mac 10.14 (#5837)
References #5833
1 parent 693e569 commit ae460f0

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

browsers.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
{
1515
"name": "webkit",
1616
"revision": "1446",
17-
"download": true
17+
"download": true,
18+
"revisionOverrides": {
19+
"mac10.14": "1443"
20+
}
1821
},
1922
{
2023
"name": "ffmpeg",

src/utils/registry.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ type BrowserDescriptor = {
3131
name: BrowserName,
3232
revision: string,
3333
download: boolean,
34+
browserDirectory: string,
3435
};
3536

3637
const EXECUTABLE_PATHS = {
@@ -107,7 +108,7 @@ const DOWNLOAD_URLS = {
107108
'ubuntu18.04': '%s/builds/webkit/%s/webkit-ubuntu-18.04.zip',
108109
'ubuntu20.04': '%s/builds/webkit/%s/webkit-ubuntu-20.04.zip',
109110
'mac10.13': undefined,
110-
'mac10.14': '%s/builds/webkit/%s/webkit-mac-10.14.zip',
111+
'mac10.14': '%s/builds/deprecated-webkit-mac-10.14/%s/deprecated-webkit-mac-10.14.zip',
111112
'mac10.15': '%s/builds/webkit/%s/webkit-mac-10.15.zip',
112113
'mac11': '%s/builds/webkit/%s/webkit-mac-10.15.zip',
113114
'mac11-arm64': '%s/builds/webkit/%s/webkit-mac-11.0-arm64.zip',
@@ -203,13 +204,24 @@ export class Registry {
203204

204205
constructor(packagePath: string) {
205206
const browsersJSON = JSON.parse(fs.readFileSync(path.join(packagePath, 'browsers.json'), 'utf8'));
206-
this._descriptors = browsersJSON['browsers'];
207+
this._descriptors = browsersJSON['browsers'].map((obj: any) => {
208+
const name = obj.name;
209+
const revisionOverride = (obj.revisionOverrides || {})[hostPlatform];
210+
const revision = revisionOverride || obj.revision;
211+
const browserDirectory = revisionOverride ? `${name}-${hostPlatform}-special-${revision}` : `${name}-${revision}`;
212+
return {
213+
name,
214+
revision,
215+
download: obj.download,
216+
browserDirectory,
217+
};
218+
});
207219
}
208220

209221
browserDirectory(browserName: BrowserName): string {
210222
const browser = this._descriptors.find(browser => browser.name === browserName);
211223
assert(browser, `ERROR: Playwright does not support ${browserName}`);
212-
return path.join(registryDirectory, `${browser.name}-${browser.revision}`);
224+
return path.join(registryDirectory, browser.browserDirectory);
213225
}
214226

215227
revision(browserName: BrowserName): number {

0 commit comments

Comments
 (0)