-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·34 lines (24 loc) · 849 Bytes
/
Copy pathrelease.sh
File metadata and controls
executable file
·34 lines (24 loc) · 849 Bytes
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
#!/bin/bash
# Exit immediately if any command fails
set -e
APP_NAME="TypingSpeed"
DMG_NAME="${APP_NAME}.dmg"
TEMP_DIR="dmg_temp"
echo "🔨 Rebuilding the application..."
./build.sh
echo "📦 Preparing packaging directory..."
rm -rf "${TEMP_DIR}"
mkdir -p "${TEMP_DIR}"
# Copy the app bundle
cp -R "${APP_NAME}.app" "${TEMP_DIR}/"
# Create symlink to Applications directory
echo "🔗 Creating Applications directory shortcut..."
ln -s /Applications "${TEMP_DIR}/Applications"
echo "📀 Creating Disk Image (DMG)..."
rm -f "${DMG_NAME}"
hdiutil create -volname "${APP_NAME}" -srcfolder "${TEMP_DIR}" -ov -format UDZO "${DMG_NAME}"
echo "🧹 Cleaning up temporary directories..."
rm -rf "${TEMP_DIR}"
echo "🚚 Copying DMG to Desktop..."
cp "${DMG_NAME}" ~/Desktop/
echo "✅ Release DMG created successfully at ~/Desktop/${DMG_NAME}!"