Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Chrome revision and added Mac_Arm chrome installation #372

Merged
merged 2 commits into from Feb 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 15 additions & 3 deletions src/browser/fetcher.rs
Expand Up @@ -18,14 +18,16 @@ use walkdir::WalkDir;
#[cfg(not(target_os = "macos"))]
use zip;

pub const CUR_REV: &str = "634997";
pub const CUR_REV: &str = "1095492";

const APP_NAME: &str = "headless-chrome";
const DEFAULT_HOST: &str = "https://storage.googleapis.com";

#[cfg(target_os = "linux")]
const PLATFORM: &str = "linux";
#[cfg(target_os = "macos")]
#[cfg(all(target_os = "macos", target_arch = "aarch64"))]
const PLATFORM: &str = "mac_arm";
#[cfg(all(target_os = "macos", not(target_arch = "aarch64")))]
const PLATFORM: &str = "mac";
#[cfg(windows)]
const PLATFORM: &str = "win";
Expand Down Expand Up @@ -346,7 +348,7 @@ where
))
}

#[cfg(target_os = "macos")]
#[cfg(all(target_os = "macos", not(target_arch = "aarch64")))]
{
Ok(format!(
"{}/chromium-browser-snapshots/Mac/{}/{}.zip",
Expand All @@ -356,6 +358,16 @@ where
))
}

#[cfg(all(target_os = "macos", target_arch = "aarch64"))]
{
Ok(format!(
"{}/chromium-browser-snapshots/Mac_Arm/{}/{}.zip",
DEFAULT_HOST,
revision.as_ref(),
archive_name(revision.as_ref())?
))
}

#[cfg(windows)]
{
Ok(format!(
Expand Down