Skip to content

Commit

Permalink
Merge pull request #372 from initprism/master
Browse files Browse the repository at this point in the history
Updated Chrome revision and added Mac_Arm chrome installation
  • Loading branch information
mdrokz committed Feb 20, 2023
2 parents 9abb619 + 12de083 commit 9ccfde8
Showing 1 changed file with 15 additions and 3 deletions.
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

0 comments on commit 9ccfde8

Please sign in to comment.