selenium-manager: Update to version 4.17.0

Fix broken checkver script, binaries no longer added to https://github.com/SeleniumHQ/selenium/raw/trunk/common/manager/windows/ but instead uploaded to https://github.com/SeleniumHQ/selenium_manager_artifacts/releases. These binaries are released more often than Selenium itself so to get the right release we need to check which one is bundled with the stable Selenium. This script was written based on the conversation here https://github.com/SeleniumHQ/selenium/issues/11694. Once binaries are released, we won't need this script. Version number changed to match the Selenium release.
This commit is contained in:
tech189 2024-02-18 21:03:07 +00:00
parent 76365b93c9
commit 3b57079396

View File

@ -1,29 +1,30 @@
{ {
"version": "0.4.17", "version": "4.17.0",
"description": "Selenium Manager is a command-line tool developed in Rust to allow cross platform execution.", "description": "Selenium Manager is a command-line tool developed in Rust to allow cross platform execution.",
"homepage": "https://www.selenium.dev/blog/2022/introducing-selenium-manager", "homepage": "https://www.selenium.dev/blog/2022/introducing-selenium-manager",
"license": "Apache-2.0", "license": "Apache-2.0",
"architecture": { "architecture": {
"64bit": { "64bit": {
"url": "https://github.com/SeleniumHQ/selenium/raw/trunk/common/manager/windows/selenium-manager.exe", "url": "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/selenium-manager-03637c4/selenium-manager-windows.exe#/selenium-manager.exe",
"hash": "887de02450c96c8b772e8b70079ebffdb2827b3d0135e0cf2aead5465acf380f" "hash": "cb6e0b5ca072038e7626f77263c4b443b1f3e6c550cf3ebf09bf7d2c237a7389"
} }
}, },
"bin": "selenium-manager.exe", "bin": "selenium-manager.exe",
"checkver": { "checkver": {
"script": [ "script": [
"$executable = \"selenium-manager.exe\"", "# This script was written based on the conversation here https://github.com/SeleniumHQ/selenium/issues/11694. Once binaries are released, we won't need this script.",
"Invoke-WebRequest -URI \"https://github.com/SeleniumHQ/selenium/raw/trunk/common/manager/windows/$executable\" -OutFile $executable", "$request = ((Invoke-WebRequest -Uri 'https://github.com/SeleniumHQ/selenium/').Content -split \"`n\" | Select-String 'selenium-([\\d.]+)')",
"[array] $cmdOutput = Invoke-Expression \".\\$executable --version\"", "$selenium_ver_string = $request.Matches[0].Value",
"Remove-Item $executable", "$selenium_ver = $request.Matches.Groups[1].Value",
"$cmdOutput" "$selenium_manager_ver_string = @((Invoke-WebRequest -Uri ('https://github.com/SeleniumHQ/selenium/raw/' + $selenium_ver_string + '/common/selenium_manager.bzl')).Content -split \"`n\" | Select-String 'selenium-manager-([a-z0-9]+)').Matches.Value[0]",
"Write-Output $selenium_ver $selenium_manager_ver_string"
], ],
"regex": "selenium-manager (.+)" "regex": "(?<version>.+)\\s(?<managerversion>.+)"
}, },
"autoupdate": { "autoupdate": {
"architecture": { "architecture": {
"64bit": { "64bit": {
"url": "https://github.com/SeleniumHQ/selenium/raw/trunk/common/manager/windows/selenium-manager.exe" "url": "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/$matchManagerversion/selenium-manager-windows.exe#/selenium-manager.exe"
} }
} }
} }