fix docker: APK in dist/ invece di output/

Rimuove la cartella output/ e monta dist/ in lettura/scrittura
così l'APK viene scritto direttamente in dist/biteplan.apk
This commit is contained in:
2026-03-25 11:25:22 +01:00
parent 0516d1e819
commit e499ce6945
2 changed files with 4 additions and 9 deletions

View File

@@ -60,5 +60,5 @@ RUN printf '\nsubprojects {\n configurations.all {\n resolutionStrateg
CMD npx cap sync android && \ CMD npx cap sync android && \
cd android && chmod +x gradlew && ./gradlew assembleDebug --no-daemon && \ cd android && chmod +x gradlew && ./gradlew assembleDebug --no-daemon && \
cp app/build/outputs/apk/debug/app-debug.apk /output/biteplan.apk && \ cp app/build/outputs/apk/debug/app-debug.apk /app/dist/biteplan.apk && \
echo "APK generato: /output/biteplan.apk" echo "APK generato: /app/dist/biteplan.apk"

View File

@@ -3,7 +3,6 @@ set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")" PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
OUTPUT_DIR="$PROJECT_ROOT/output"
DIST_DIR="$PROJECT_ROOT/dist" DIST_DIR="$PROJECT_ROOT/dist"
FROM_HEAD=false FROM_HEAD=false
@@ -11,9 +10,6 @@ for arg in "$@"; do
[[ "$arg" == "--head" ]] && FROM_HEAD=true [[ "$arg" == "--head" ]] && FROM_HEAD=true
done done
echo "==> Preparazione cartelle..."
mkdir -p "$OUTPUT_DIR"
# ── Build Vite ──────────────────────────────────────────────────────────────── # ── Build Vite ────────────────────────────────────────────────────────────────
if $FROM_HEAD; then if $FROM_HEAD; then
COMMIT_SHA=$(git -C "$PROJECT_ROOT" rev-parse --short HEAD) COMMIT_SHA=$(git -C "$PROJECT_ROOT" rev-parse --short HEAD)
@@ -43,9 +39,8 @@ docker build \
# ── Generazione APK (dist/ montato come volume) ─────────────────────────────── # ── Generazione APK (dist/ montato come volume) ───────────────────────────────
echo "==> Generazione APK..." echo "==> Generazione APK..."
docker run --rm \ docker run --rm \
-v "$DIST_DIR:/app/dist:ro" \ -v "$DIST_DIR:/app/dist" \
-v "$OUTPUT_DIR:/output" \
biteplan-builder biteplan-builder
echo "" echo ""
echo "APK pronto in: $OUTPUT_DIR/biteplan.apk" echo "APK pronto in: $DIST_DIR/biteplan.apk"