mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-07-16 17:37:22 +02:00
build: remove universal macos build until @yao-pkg/pkg has support for universal macos binaries
This commit is contained in:
@@ -57,12 +57,6 @@ jobs:
|
||||
target: "x86_64-apple-darwin"
|
||||
pkg_target: "latest-macos-x64"
|
||||
nodecar_script: "build:mac-x86_64"
|
||||
- platform: "macos-latest"
|
||||
args: "--target universal-apple-darwin"
|
||||
arch: "aarch64"
|
||||
target: "aarch64-apple-darwin"
|
||||
pkg_target: "universal"
|
||||
nodecar_script: "build:mac-universal"
|
||||
- platform: "ubuntu-22.04"
|
||||
args: "--target x86_64-unknown-linux-gnu"
|
||||
arch: "x86_64"
|
||||
|
||||
@@ -56,12 +56,6 @@ jobs:
|
||||
target: "x86_64-apple-darwin"
|
||||
pkg_target: "latest-macos-x64"
|
||||
nodecar_script: "build:mac-x86_64"
|
||||
- platform: "macos-latest"
|
||||
args: "--target universal-apple-darwin"
|
||||
arch: "aarch64"
|
||||
target: "aarch64-apple-darwin,x86_64-apple-darwin"
|
||||
pkg_target: "universal"
|
||||
nodecar_script: "build:mac-universal"
|
||||
- platform: "ubuntu-22.04"
|
||||
args: "--target x86_64-unknown-linux-gnu"
|
||||
arch: "x86_64"
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
"build": "tsc && pkg ./dist/index.js --targets latest-macos-arm64 --output dist/nodecar && pnpm rename-binary",
|
||||
"build:mac-aarch64": "tsc && pkg ./dist/index.js --targets latest-macos-arm64 --output dist/nodecar && pnpm rename-binary",
|
||||
"build:mac-x86_64": "tsc && pkg ./dist/index.js --targets latest-macos-x64 --output dist/nodecar && pnpm rename-binary",
|
||||
"build:mac-universal": "pnpm build:mac-aarch64 && pnpm rename-binary && pnpm build:mac-x86_64 && pnpm rename-binary x86_64-apple-darwin",
|
||||
"build:linux-x64": "tsc && pkg ./dist/index.js --targets latest-linux-x64 --output dist/nodecar && pnpm rename-binary",
|
||||
"build:linux-arm64": "tsc && pkg ./dist/index.js --targets latest-linux-arm64 --output dist/nodecar && pnpm rename-binary",
|
||||
"build:win-x64": "tsc && pkg ./dist/index.js --targets latest-win-x64 --output dist/nodecar && pnpm rename-binary",
|
||||
|
||||
@@ -227,45 +227,7 @@ impl AppAutoUpdater {
|
||||
|
||||
/// Get the appropriate download URL for the current platform
|
||||
fn get_download_url_for_platform(&self, assets: &[AppReleaseAsset]) -> Option<String> {
|
||||
println!("Looking for macOS universal binary assets");
|
||||
for asset in assets {
|
||||
println!("Found asset: {}", asset.name);
|
||||
}
|
||||
|
||||
// Priority 1: Look for universal macOS DMG (preferred)
|
||||
for asset in assets {
|
||||
if asset.name.contains(".dmg")
|
||||
&& (asset.name.contains("universal")
|
||||
|| asset.name.contains("Universal")
|
||||
|| asset.name.contains("_universal.dmg")
|
||||
|| asset.name.contains("-universal.dmg")
|
||||
|| asset.name.contains("_universal_")
|
||||
|| asset.name.contains("-universal-"))
|
||||
{
|
||||
println!("Found universal binary: {}", asset.name);
|
||||
return Some(asset.browser_download_url.clone());
|
||||
}
|
||||
}
|
||||
|
||||
// Priority 2: Look for generic macOS DMG without architecture specification
|
||||
// This would be the case for universal binaries that don't explicitly mention "universal"
|
||||
for asset in assets {
|
||||
if asset.name.contains(".dmg")
|
||||
&& (asset.name.to_lowercase().contains("macos")
|
||||
|| asset.name.to_lowercase().contains("darwin"))
|
||||
&& !asset.name.contains("x64")
|
||||
&& !asset.name.contains("x86_64")
|
||||
&& !asset.name.contains("x86-64")
|
||||
&& !asset.name.contains("aarch64")
|
||||
&& !asset.name.contains("arm64")
|
||||
&& !asset.name.contains(".app.tar.gz")
|
||||
{
|
||||
println!("Found generic macOS DMG (likely universal): {}", asset.name);
|
||||
return Some(asset.browser_download_url.clone());
|
||||
}
|
||||
}
|
||||
|
||||
// Priority 3: Fallback to current architecture-specific binary for backward compatibility
|
||||
// Priority 1: Get architecture-specific binary for backward compatibility
|
||||
let arch = if cfg!(target_arch = "aarch64") {
|
||||
"aarch64"
|
||||
} else if cfg!(target_arch = "x86_64") {
|
||||
@@ -313,7 +275,7 @@ impl AppAutoUpdater {
|
||||
}
|
||||
}
|
||||
|
||||
// Priority 4: Final fallback to any macOS DMG
|
||||
// Priority 2: Fallback to any macOS DMG
|
||||
for asset in assets {
|
||||
if asset.name.contains(".dmg")
|
||||
&& (asset.name.to_lowercase().contains("macos")
|
||||
|
||||
Reference in New Issue
Block a user