forked from Abdenasser/neohtop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-universal.sh
executable file
·38 lines (34 loc) · 1.19 KB
/
build-universal.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/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 --bundles dmg
# Build for Apple Silicon
echo "Building for aarch64..."
npm run tauri build -- --target aarch64-apple-darwin --bundles dmg