Skip to content

Commit

Permalink
Stabilize build
Browse files Browse the repository at this point in the history
  • Loading branch information
rosolko committed Sep 16, 2022
1 parent 41db34f commit 2bfdfb0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
8 changes: 6 additions & 2 deletions WebDriverManager/DriverConfigs/Impl/ChromeConfig.cs
Expand Up @@ -34,8 +34,11 @@ private string GetUrl()
#if NETSTANDARD
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
var extension = RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? "_m1" : "";
return $"{BaseVersionPatternUrl}chromedriver_mac64{extension}.zip";
var architectureExtension =
RuntimeInformation.ProcessArchitecture == System.Runtime.InteropServices.Architecture.Arm64
? "_m1"
: "";
return $"{BaseVersionPatternUrl}chromedriver_mac64{architectureExtension}.zip";
}

if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
Expand Down Expand Up @@ -88,6 +91,7 @@ public virtual string GetMatchingBrowserVersion()
{
throw new Exception("Not able to get chrome version or not installed");
}

var chromeBrowserVersion = VersionHelper.GetVersionWithoutRevision(rawChromeBrowserVersion);
var url = ExactReleaseVersionPatternUrl.Replace("<version>", chromeBrowserVersion);
return GetLatestVersion(url);
Expand Down
7 changes: 5 additions & 2 deletions WebDriverManager/DriverConfigs/Impl/EdgeConfig.cs
Expand Up @@ -26,8 +26,11 @@ public virtual string GetUrl64()
#if NETSTANDARD
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
var extension = RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? "_m1" : "";
return $"{BaseVersionPatternUrl}edgedriver_mac64{extension}.zip";
var architectureExtension =
RuntimeInformation.ProcessArchitecture == System.Runtime.InteropServices.Architecture.Arm64
? "_m1"
: "";
return $"{BaseVersionPatternUrl}edgedriver_mac64{architectureExtension}.zip";
}

if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
Expand Down
10 changes: 7 additions & 3 deletions WebDriverManager/DriverConfigs/Impl/FirefoxConfig.cs
Expand Up @@ -10,7 +10,8 @@ namespace WebDriverManager.DriverConfigs.Impl
{
public class FirefoxConfig : IDriverConfig
{
private const string DownloadUrl = "https://github.com/mozilla/geckodriver/releases/download/v<version>/geckodriver-v<version>-";
private const string DownloadUrl =
"https://github.com/mozilla/geckodriver/releases/download/v<version>/geckodriver-v<version>-";

public virtual string GetName()
{
Expand Down Expand Up @@ -81,8 +82,11 @@ private static string GetUrl(Architecture architecture)
#if NETSTANDARD
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
var extension = RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? "-aarch64" : "";
return $"{DownloadUrl}macos{extension}.tar.gz";
var architectureExtension =
RuntimeInformation.ProcessArchitecture == System.Runtime.InteropServices.Architecture.Arm64
? "-aarch64"
: "";
return $"{DownloadUrl}macos{architectureExtension}.tar.gz";
}

return RuntimeInformation.IsOSPlatform(OSPlatform.Linux)
Expand Down

0 comments on commit 2bfdfb0

Please sign in to comment.