From 631fdbfa0310cc3f3667b0d01192bd38b246f0c5 Mon Sep 17 00:00:00 2001 From: Subhamoy Biswas Date: Sat, 21 Dec 2024 16:10:12 +0530 Subject: [PATCH] (ci/cd): fixed macOS ARM binary misplaced with x86_64 --- copyFiles.aarch64-apple-darwin.js | 4 ++-- src-tauri/tauri.macos.conf.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/copyFiles.aarch64-apple-darwin.js b/copyFiles.aarch64-apple-darwin.js index c7ff7e7..8c82ce8 100644 --- a/copyFiles.aarch64-apple-darwin.js +++ b/copyFiles.aarch64-apple-darwin.js @@ -5,9 +5,9 @@ import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -const msghostSrc = path.join(__dirname, 'src-tauri', 'target', 'aarch64-apple-darwin', 'release', 'pytubepp-helper-msghost'); +const msghostSrc = path.join(__dirname, 'src-tauri', 'target', 'release', 'pytubepp-helper-msghost'); const msghostDest = path.join(__dirname, 'src-tauri', 'pytubepp-helper-msghost'); -const autostartSrc = path.join(__dirname, 'src-tauri', 'target', 'aarch64-apple-darwin', 'release', 'pytubepp-helper-autostart'); +const autostartSrc = path.join(__dirname, 'src-tauri', 'target', 'release', 'pytubepp-helper-autostart'); const autostartDest = path.join(__dirname, 'src-tauri', 'pytubepp-helper-autostart'); const autostartPlistSrc = path.join(__dirname, 'src-tauri', 'autostart', 'pytubepp-helper-autostart.plist'); const autostartPlistDest = path.join(__dirname, 'src-tauri', 'pytubepp-helper-autostart.plist'); diff --git a/src-tauri/tauri.macos.conf.json b/src-tauri/tauri.macos.conf.json index a4526d6..6477e41 100644 --- a/src-tauri/tauri.macos.conf.json +++ b/src-tauri/tauri.macos.conf.json @@ -1,7 +1,7 @@ { "build": { - "beforeDevCommand": "[[ -n \"$TARGET_ARCH\" ]] && ARCH=\"$TARGET_ARCH\" || ARCH=\"$(uname -m | sed 's/^arm64$/aarch64/')-apple-darwin\" && cargo build --target=$ARCH --manifest-path=./src-tauri/msghost/Cargo.toml && cargo build --target=$ARCH --manifest-path=./src-tauri/autostart/Cargo.toml && npm run dev", - "beforeBuildCommand": "[[ -n \"$TARGET_ARCH\" ]] && ARCH=\"$TARGET_ARCH\" || ARCH=\"$(uname -m | sed 's/^arm64$/aarch64/')-apple-darwin\" && cargo build --release --target=$ARCH --manifest-path=./src-tauri/msghost/Cargo.toml && cargo build --release --target=$ARCH --manifest-path=./src-tauri/autostart/Cargo.toml && node copyFiles.${ARCH}.js && npm run build", + "beforeDevCommand": "[[ -n \"$TARGET_ARCH\" ]] && ARCH=\"$TARGET_ARCH\" || ARCH=\"$(uname -m | sed 's/^arm64$/aarch64/')-apple-darwin\" && [[ \"$ARCH\" == \"aarch64-apple-darwin\" ]] && cargo build --manifest-path=./src-tauri/msghost/Cargo.toml && cargo build --manifest-path=./src-tauri/autostart/Cargo.toml || cargo build --target=$ARCH --manifest-path=./src-tauri/msghost/Cargo.toml && cargo build --target=$ARCH --manifest-path=./src-tauri/autostart/Cargo.toml && npm run dev", + "beforeBuildCommand": "[[ -n \"$TARGET_ARCH\" ]] && ARCH=\"$TARGET_ARCH\" || ARCH=\"$(uname -m | sed 's/^arm64$/aarch64/')-apple-darwin\" && [[ \"$ARCH\" == \"aarch64-apple-darwin\" ]] && cargo build --release --manifest-path=./src-tauri/msghost/Cargo.toml && cargo build --release --manifest-path=./src-tauri/autostart/Cargo.toml && node copyFiles.${ARCH}.js && npm run build || cargo build --release --target=$ARCH --manifest-path=./src-tauri/msghost/Cargo.toml && cargo build --release --target=$ARCH --manifest-path=./src-tauri/autostart/Cargo.toml && node copyFiles.${ARCH}.js && npm run build", "devPath": "http://localhost:1422", "distDir": "../dist" },