Skip to content

Commit 77d6767

Browse files
committed
Revert "Use tax.xz for Firefox package starting in version 135 in pinned browsers (SeleniumHQ#15115)"
This reverts commit 86f165e
1 parent ab9d5b3 commit 77d6767

File tree

1 file changed

+23
-28
lines changed

1 file changed

+23
-28
lines changed

scripts/pinned_browsers.py

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ def chromedriver(selected_version):
5757
sha = calculate_hash(linux)
5858

5959
content = (
60-
content
61-
+ """ http_archive(
60+
content
61+
+ """ http_archive(
6262
name = "linux_chromedriver",
6363
url = "%s",
6464
sha256 = "%s",
@@ -76,14 +76,14 @@ def chromedriver(selected_version):
7676
\"\"\",
7777
)
7878
"""
79-
% (linux, sha)
79+
% (linux, sha)
8080
)
8181

8282
mac = [d["url"] for d in drivers if d["platform"] == "mac-x64"][0]
8383
sha = calculate_hash(mac)
8484
content = (
85-
content
86-
+ """
85+
content
86+
+ """
8787
http_archive(
8888
name = "mac_chromedriver",
8989
url = "%s",
@@ -102,7 +102,7 @@ def chromedriver(selected_version):
102102
\"\"\",
103103
)
104104
"""
105-
% (mac, sha)
105+
% (mac, sha)
106106
)
107107

108108
return content
@@ -286,8 +286,8 @@ def edgedriver():
286286
linux = "https://msedgedriver.azureedge.net/%s/edgedriver_linux64.zip" % linux_version
287287
sha = calculate_hash(linux)
288288
content = (
289-
content
290-
+ """
289+
content
290+
+ """
291291
http_archive(
292292
name = "linux_edgedriver",
293293
url = "%s",
@@ -305,16 +305,16 @@ def edgedriver():
305305
\"\"\",
306306
)
307307
"""
308-
% (linux, sha)
308+
% (linux, sha)
309309
)
310310

311311
r = http.request("GET", f"https://msedgedriver.azureedge.net/LATEST_RELEASE_{major_version}_MACOS")
312312
macos_version = r.data.decode("utf-16").strip()
313313
mac = "https://msedgedriver.azureedge.net/%s/edgedriver_mac64.zip" % macos_version
314314
sha = calculate_hash(mac)
315315
content = (
316-
content
317-
+ """
316+
content
317+
+ """
318318
http_archive(
319319
name = "mac_edgedriver",
320320
url = "%s",
@@ -332,7 +332,7 @@ def edgedriver():
332332
\"\"\",
333333
)
334334
"""
335-
% (mac, sha)
335+
% (mac, sha)
336336
)
337337
return content
338338

@@ -346,8 +346,8 @@ def geckodriver():
346346
url = a["browser_download_url"]
347347
sha = calculate_hash(url)
348348
content = (
349-
content
350-
+ """ http_archive(
349+
content
350+
+ """ http_archive(
351351
name = "linux_geckodriver",
352352
url = "%s",
353353
sha256 = "%s",
@@ -364,15 +364,15 @@ def geckodriver():
364364
\"\"\",
365365
)
366366
"""
367-
% (url, sha)
367+
% (url, sha)
368368
)
369369

370370
if a["name"].endswith("-macos.tar.gz"):
371371
url = a["browser_download_url"]
372372
sha = calculate_hash(url)
373373
content = (
374-
content
375-
+ """
374+
content
375+
+ """
376376
http_archive(
377377
name = "mac_geckodriver",
378378
url = "%s",
@@ -390,7 +390,7 @@ def geckodriver():
390390
\"\"\",
391391
)
392392
"""
393-
% (url, sha)
393+
% (url, sha)
394394
)
395395
return content
396396

@@ -416,12 +416,7 @@ def firefox_version_data():
416416

417417

418418
def firefox_linux(version):
419-
if int(version.split(".")[0]) < 135:
420-
return "https://ftp.mozilla.org/pub/firefox/releases/%s/linux-x86_64/en-US/firefox-%s.tar.bz2" % (
421-
version, version)
422-
else:
423-
return "https://ftp.mozilla.org/pub/firefox/releases/%s/linux-x86_64/en-US/firefox-%s.tar.xz" % (
424-
version, version)
419+
return "https://ftp.mozilla.org/pub/firefox/releases/%s/linux-x86_64/en-US/firefox-%s.tar.bz2" % (version, version)
425420

426421

427422
def firefox_mac(version):
@@ -432,8 +427,8 @@ def print_firefox(version, workspace_name, sha_linux, sha_mac):
432427
content = ""
433428

434429
content = (
435-
content
436-
+ f""" http_archive(
430+
content
431+
+ f""" http_archive(
437432
name = "linux_{workspace_name}firefox",
438433
url = "{firefox_linux(version)}",
439434
sha256 = "{sha_linux}",
@@ -459,8 +454,8 @@ def print_firefox(version, workspace_name, sha_linux, sha_mac):
459454
)
460455

461456
content = (
462-
content
463-
+ f""" dmg_archive(
457+
content
458+
+ f""" dmg_archive(
464459
name = "mac_{workspace_name}firefox",
465460
url = "{firefox_mac(version)}",
466461
sha256 = "{sha_mac}",

0 commit comments

Comments
 (0)