Skip to content

Commit

Permalink
Updating pinned browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed Apr 8, 2022
1 parent 4d998e1 commit 72226ee
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 26 deletions.
53 changes: 31 additions & 22 deletions common/repositories.bzl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# This file has been generated using `bazel run scripts:pinned_browsers`

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
Expand All @@ -10,74 +11,82 @@ def pin_browsers():

http_archive(
name = "linux_firefox",
url = "https://ftp.mozilla.org/pub/firefox/releases/98.0.2/linux-x86_64/en-US/firefox-98.0.2.tar.bz2",
sha256 = "07c5f3dad0850a92d5c609278fb1fe682b2562fa55e6733c09a6b4da7373bfcc",
url = "https://ftp.mozilla.org/pub/firefox/releases/99.0/linux-x86_64/en-US/firefox-99.0.tar.bz2",
sha256 = "b6d895047c8911a49d944f78f710718091957f0057344cea735096ab4a8c07d1",
build_file_content = "exports_files([\"firefox\"])",
)

dmg_archive(
name = "mac_firefox",
url = "https://ftp.mozilla.org/pub/firefox/releases/98.0.2/mac/en-US/Firefox%2098.0.2.dmg",
sha256 = "304dfd917c0dcda0313dab1576b520d56de8af7af2e47e7763166d4f5da99851",
url = "https://ftp.mozilla.org/pub/firefox/releases/99.0/mac/en-US/Firefox%2099.0.dmg",
sha256 = "c54367d73f3d47b7f41eb5751014168a27584674b8fb2e541c05f835baccf623",
build_file_content = "exports_files([\"Firefox.app\"])",
)

http_archive(
name = "linux_geckodriver",
url = "https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz",
sha256 = "12c37f41d11ed982b7be43d02411ff2c75fb7a484e46966d000b47d1665baa88",
build_file_content = "exports_files([\"geckodriver\"])",
)

http_archive(
name = "mac_geckodriver",
url = "https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-macos.tar.gz",
sha256 = "560ba192666c1fe8796404153cfdf2d12551515601c4b3937aabcba6ee300f8c",
build_file_content = "exports_files([\"geckodriver\"])",
)

pkg_archive(
name = "mac_edge",
url = "https://officecdn-microsoft-com.akamaized.net/pr/C1297A47-86C4-4C1F-97FA-950631F94777/MacAutoupdate/MicrosoftEdge-99.0.1150.55.pkg?platform=Mac&Consent=0&channel=Stable",
sha256 = "201e68e4c1676fe1f16f5dbe21b581df128420e59b46a3ea79d80adfc55a0d57",
url = "https://officecdn-microsoft-com.akamaized.net/pr/C1297A47-86C4-4C1F-97FA-950631F94777/MacAutoupdate/MicrosoftEdge-100.0.1185.29.pkg?platform=Mac&Consent=0&channel=Stable",
sha256 = "c80ab77355c04887a7a3bb829c72915f41d0379f342e73a1b33f2e6604cdf11e",
move = {
"MicrosoftEdge-99.0.1150.55.pkg/Payload/Microsoft Edge.app": "Edge.app",
"MicrosoftEdge-100.0.1185.29.pkg/Payload/Microsoft Edge.app": "Edge.app",
},
build_file_content = "exports_files([\"Edge.app\"])",
)


http_archive(
name = "linux_edgedriver",
url = "https://msedgedriver.azureedge.net/100.0.1185.29/edgedriver_linux64.zip",
sha256 = "07ab098a5e2bfb4c0895e6f9c778bc7495a3782a00b3eff4e758912d182d39e8",
build_file_content = "exports_files([\"msedgedriver\"])",
)

http_archive(
name = "mac_edgedriver",
url = "https://msedgedriver.azureedge.net/99.0.1150.55/edgedriver_mac64.zip",
sha256 = "8581a2e3c91b393485ca7b7e86a04bacaad1ba44ce87d0b350163e3c816f1ed9",
url = "https://msedgedriver.azureedge.net/100.0.1185.29/edgedriver_mac64.zip",
sha256 = "4b7a624a2d9fda85b5ce34ef4857b8f4dcb93a976060069956dd4eed29101870",
build_file_content = "exports_files([\"msedgedriver\"])",
)

http_archive(
name = "linux_chrome",
url = "https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/972739/chrome-linux.zip",
sha256 = "228f8a7b4ab7bd3c43d555ba5857a8240f21fc5df96a91cc827d0ae509b01097",
build_file_content = "exports_files([\"chrome-linux\"])",
)

http_archive(
name = "mac_chrome",
url = "https://storage.googleapis.com/chromium-browser-snapshots/Mac/972739/chrome-mac.zip",
sha256 = "a9c59baa2c6c455172c1780ee3411f4b3aa0561a8ed2882d7247d6716d6ccd66",
strip_prefix = "chrome-mac",
build_file_content = "exports_files([\"Chromium.app\"])",
)

http_archive(
name = "linux_chromedriver",
url = "https://chromedriver.storage.googleapis.com/99.0.4844.51/chromedriver_linux64.zip",
sha256 = "3e948b12229667fbb30897de3bae4a3deaac998e552be9a5094227b91c5bbce4",
url = "https://chromedriver.storage.googleapis.com/100.0.4896.60/chromedriver_linux64.zip",
sha256 = "617cd4bad5f476a8c2a764d595d808a9d6ada4a35d4f89e2af1234c6206f2d61",
build_file_content = "exports_files([\"chromedriver\"])",
)

http_archive(
name = "mac_chromedriver",
url = "https://chromedriver.storage.googleapis.com/99.0.4844.51/chromedriver_mac64.zip",
sha256 = "9723d866b6d9e151e985ed206232264ff1fc41082cd5713a2589e706cb4553d9",
url = "https://chromedriver.storage.googleapis.com/100.0.4896.60/chromedriver_mac64.zip",
sha256 = "492bce3b556419b3fea9adbc2699b363445cdd5a74ba902cc579cd5b1c9c1160",
build_file_content = "exports_files([\"chromedriver\"])",
)

26 changes: 22 additions & 4 deletions scripts/pinned_browsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,35 @@ def edge():
)
""" % (edge, sha, v)

driver = "https://msedgedriver.azureedge.net/%s/edgedriver_mac64.zip" % v
sha = calculate_hash(driver)
return content

def edgedriver():
r = http.request('GET', 'https://msedgedriver.azureedge.net/LATEST_STABLE')
v = r.data.decode('utf-16').strip()

content = ""

linux = "https://msedgedriver.azureedge.net/%s/edgedriver_linux64.zip" % v
sha = calculate_hash(linux)
content = content + """
http_archive(
name = "mac_edgedriver",
name = "linux_edgedriver",
url = "%s",
sha256 = "%s",
build_file_content = "exports_files([\\"msedgedriver\\"])",
)
""" % (driver, sha)
""" % (linux, sha)

mac = "https://msedgedriver.azureedge.net/%s/edgedriver_mac64.zip" % v
sha = calculate_hash(mac)
content = content + """
http_archive(
name = "mac_edgedriver",
url = "%s",
sha256 = "%s",
build_file_content = "exports_files([\\"msedgedriver\\"])",
)
""" % (mac, sha)
return content

def geckodriver():
Expand Down Expand Up @@ -209,6 +226,7 @@ def pin_browsers():
content = content + firefox()
content = content + geckodriver()
content = content + edge()
content = content + edgedriver()
content = content + chrome()
content = content + chromedriver()

Expand Down

0 comments on commit 72226ee

Please sign in to comment.