|
14 | 14 | http = urllib3.PoolManager() |
15 | 15 | root_dir = Path(os.path.realpath(__file__)).parent.parent |
16 | 16 |
|
| 17 | +"""This is the same method from pinned_browser. Use --chrome_channel=Beta if |
| 18 | +using early stable release.""" |
| 19 | +parser = argparse.ArgumentParser() |
| 20 | +parser.add_argument( |
| 21 | + "--chrome_channel", default="Stable", help="Set the Chrome channel" |
| 22 | +) |
| 23 | +args = parser.parse_args() |
| 24 | +channel = args.chrome_channel |
17 | 25 |
|
18 | 26 | def get_chrome_milestone(): |
19 | | - """This is the same method from pinned_browser. Use --chrome_channel=Beta if |
20 | | - using early stable release.""" |
21 | | - parser = argparse.ArgumentParser() |
22 | | - parser.add_argument( |
23 | | - "--chrome_channel", default="Stable", help="Set the Chrome channel" |
24 | | - ) |
25 | | - args = parser.parse_args() |
26 | | - channel = args.chrome_channel |
27 | | - |
28 | 27 | r = http.request( |
29 | 28 | "GET", |
30 | 29 | f"https://chromiumdash.appspot.com/fetch_releases?channel={channel}&num=1&platform=Mac,Linux", |
@@ -195,16 +194,12 @@ def update_dotnet(chrome_milestone): |
195 | 194 | file, old_chrome(chrome_milestone), new_chrome(chrome_milestone) |
196 | 195 | ) |
197 | 196 |
|
198 | | - files = [ |
199 | | - root_dir / "dotnet/test/common/CustomDriverConfigs/StableChannelChromeDriver.cs" |
200 | | - ] |
201 | | - dir_path = root_dir / "dotnet/test/common/DevTools" |
202 | | - files.extend(str(file) for file in dir_path.glob("*") if file.is_file()) |
203 | | - for file in files: |
204 | | - replace_in_file( |
205 | | - file, previous_chrome(chrome_milestone), new_chrome(chrome_milestone) |
206 | | - ) |
207 | | - |
| 197 | + if channel == "Stable": |
| 198 | + dir_path = root_dir / "dotnet/test/common/DevTools" |
| 199 | + for file in dir_path.glob("*") if file.is_file() |
| 200 | + replace_in_file( |
| 201 | + file, previous_chrome(chrome_milestone), new_chrome(chrome_milestone) |
| 202 | + ) |
208 | 203 |
|
209 | 204 | def update_ruby(chrome_milestone): |
210 | 205 | file = root_dir / "rb/lib/selenium/devtools/BUILD.bazel" |
|
0 commit comments