-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35219c9
commit 36371d3
Showing
5 changed files
with
31 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 "[email protected]" | ||
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 "[email protected]" | ||
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!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters