global fix and add tauri app

This commit is contained in:
lendry
2026-06-26 13:56:54 +03:00
parent aa228d84eb
commit 3b05b7e4d4
50 changed files with 3947 additions and 80 deletions

View File

@@ -0,0 +1,36 @@
#!/usr/bin/env bash
set -euo pipefail
cd /workspace
export VITE_API_URL="${VITE_API_URL:-${PUBLIC_API_URL:-http://localhost:3000}}"
export VITE_FRONTEND_URL="${VITE_FRONTEND_URL:-${PUBLIC_FRONTEND_URL:-http://localhost:3002}}"
mkdir -p /out
echo "==> Проверка web-сборки tauri_app"
npm --workspace @lendry/tauri-app run build
cd /workspace/tauri_app
if [ ! -d "src-tauri/gen/android" ]; then
echo "==> Инициализация Android проекта Tauri"
npm run android:init -- --ci || npm run android:init
fi
echo "==> Сборка Android APK"
npm run tauri -- android build --apk
APK_PATH="$(find /workspace/tauri_app/src-tauri/gen/android -type f -name '*.apk' | sort | tail -n 1 || true)"
if [ -z "${APK_PATH}" ] || [ ! -f "${APK_PATH}" ]; then
echo "APK не найден после сборки" >&2
find /workspace/tauri_app/src-tauri/gen/android -maxdepth 8 -type f | sort >&2 || true
exit 1
fi
cp "${APK_PATH}" /out/lendry-id.apk
chmod 0644 /out/lendry-id.apk
echo "==> APK готов: /out/lendry-id.apk"
ls -lh /out/lendry-id.apk