From 609891bcb9ef88b05d453b289481cf8a206cc33a Mon Sep 17 00:00:00 2001 From: titusfortner Date: Tue, 5 Dec 2023 08:26:53 -0600 Subject: [PATCH] allow pinned browsers script to overwrite bazel file directly git ftw --- scripts/pinned_browsers.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/pinned_browsers.py b/scripts/pinned_browsers.py index f4c1574acf52b..09fa8f3d4e1bf 100755 --- a/scripts/pinned_browsers.py +++ b/scripts/pinned_browsers.py @@ -6,6 +6,7 @@ import urllib3 from packaging.version import parse +from pathlib import Path # Find the current stable versions of each browser we # support and the sha256 of these. That's useful for @@ -274,4 +275,8 @@ def pin_browsers(): content = content + chrome() content = content + chromedriver() - print(content) + current_script_dir = Path(os.path.realpath(__file__)).parent + target_file_path = current_script_dir.parent / 'common/repositories.bzl' + + with open(target_file_path, 'w') as file: + file.write(content)