-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·38 lines (28 loc) · 1.1 KB
/
deploy.sh
File metadata and controls
executable file
·38 lines (28 loc) · 1.1 KB
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
38
#!/bin/bash
# Deploy APK to server
# This script builds the APK and deploys it to your web server
set -e # Exit on any error
echo "🚀 Starting APK deployment..."
# Build the APK
echo "📱 Building APK..."
export ANDROID_HOME=/home/henry/android-sdk
./gradlew assembleDebug
# Check if build was successful
if [ ! -f "app/build/outputs/apk/debug/app-debug.apk" ]; then
echo "❌ APK build failed!"
exit 1
fi
echo "✅ APK built successfully"
# Deploy to server
echo "🌐 Deploying to server..."
# Copy APK to server
scp app/build/outputs/apk/debug/app-debug.apk henry@romptele.com:/tmp/listen.apk
# Move and set permissions on server
ssh henry@romptele.com << 'EOF'
sudo mv /tmp/listen.apk /home/henry/webserver/domains/com/hromp.com/public_html/downloads/listen.apk
sudo chmod 644 /home/henry/webserver/domains/com/hromp.com/public_html/downloads/listen.apk
sudo chown root:root /home/henry/webserver/domains/com/hromp.com/public_html/downloads/listen.apk
echo "✅ APK deployed successfully!"
EOF
echo "🎉 Deployment complete!"
echo "📥 APK available at: https://hromp.com/downloads/listen.apk"