diff --git a/build-universal.sh b/build-universal.sh index efef99c..9e9f73d 100755 --- a/build-universal.sh +++ b/build-universal.sh @@ -1,32 +1,38 @@ #!/bin/bash +# source .env for notarization credentials +echo "Sourcing .env..." +if [ -f .env ]; then + source .env + # Verify that required environment variables are set + if [ -z "$APPLE_ID" ] || [ -z "$APPLE_PASSWORD" ] || [ -z "$APPLE_TEAM_ID" ]; then + echo "Error: Required environment variables are not set" + echo "Please ensure your .env file contains:" + echo "APPLE_ID=your.email@example.com" + echo "APPLE_PASSWORD=your-app-specific-password" + echo "APPLE_TEAM_ID=your-team-id" + exit 1 + fi + # Export the variables so they are available to child processes + export APPLE_ID + export APPLE_PASSWORD + export APPLE_TEAM_ID +else + echo "Error: .env file not found" + echo "Please create a .env file with the following variables:" + echo "APPLE_ID=your.email@example.com" + echo "APPLE_PASSWORD=your-app-specific-password" + echo "APPLE_TEAM_ID=your-team-id" + exit 1 +fi # Build frontend npm run build # Build for Intel echo "Building for x86_64..." -npm run tauri build -- --target x86_64-apple-darwin +npm run tauri build -- --target x86_64-apple-darwin --bundles dmg # Build for Apple Silicon echo "Building for aarch64..." -npm run tauri build -- --target aarch64-apple-darwin +npm run tauri build -- --target aarch64-apple-darwin --bundles dmg -# Create universal binary directory -mkdir -p src-tauri/target/universal-apple-darwin/release - -# Create universal binary -echo "Creating universal binary..." -lipo "src-tauri/target/x86_64-apple-darwin/release/macos-task-manager" \ - "src-tauri/target/aarch64-apple-darwin/release/macos-task-manager" \ - -create -output "src-tauri/target/universal-apple-darwin/release/macos-task-manager" - -# Create universal app bundle -echo "Creating universal app bundle..." -cp -r "src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/NeoHtop.app" \ - "src-tauri/target/universal-apple-darwin/release/" - -# Replace the binary in the app bundle -cp "src-tauri/target/universal-apple-darwin/release/macos-task-manager" \ - "src-tauri/target/universal-apple-darwin/release/NeoHtop.app/Contents/MacOS/" - -echo "Universal build complete!" diff --git a/package.json b/package.json index babd2f5..8bac344 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "macos-task-manager", - "version": "0.1.0", + "version": "0.1.2", "description": "", "type": "module", "scripts": { diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 621e67a..3b4a671 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2009,7 +2009,7 @@ dependencies = [ [[package]] name = "macos-task-manager" -version = "0.1.0" +version = "0.1.2" dependencies = [ "serde", "serde_json", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index a7694da..515bcc5 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "macos-task-manager" -version = "0.1.0" +version = "0.1.2" description = "A Tauri App" authors = ["you"] edition = "2021" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 62d0cd0..04dc233 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "NeoHtop", - "version": "0.1.0" + "version": "0.1.2" }, "tauri": { "allowlist": {