Aggiunge integrazione Capacitor per build APK Android
This commit is contained in:
37
build-apk.sh
Executable file
37
build-apk.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "========================================="
|
||||
echo " Building APK for Segnapunti Android "
|
||||
echo "========================================="
|
||||
echo ""
|
||||
|
||||
# Rileva architettura
|
||||
ARCH=$(uname -m)
|
||||
echo "Architettura rilevata: $ARCH"
|
||||
|
||||
# Crea directory output se non esiste
|
||||
mkdir -p output
|
||||
|
||||
echo "Building Docker image..."
|
||||
docker build --platform linux/$(uname -m) -t segnapunti-android-builder .
|
||||
|
||||
echo ""
|
||||
echo "Building APK inside Docker container..."
|
||||
docker run --rm \
|
||||
-v "$(pwd)/output:/app/output" \
|
||||
segnapunti-android-builder
|
||||
|
||||
echo ""
|
||||
echo "========================================="
|
||||
echo "Build completed successfully!"
|
||||
echo "========================================="
|
||||
echo ""
|
||||
echo "APK location: $(pwd)/output/segnapunti-debug.apk"
|
||||
echo ""
|
||||
echo "Per installare su dispositivo Android:"
|
||||
echo " adb install output/segnapunti-debug.apk"
|
||||
echo ""
|
||||
echo "Oppure trasferisci il file sul dispositivo"
|
||||
echo "e installalo manualmente."
|
||||
echo ""
|
||||
Reference in New Issue
Block a user