Harden Android deployment and implement dynamic port allocation
- Replace fixed ports with dynamic allocation (port 0) for all Stalwart listeners, including ManageSieve. - Require KVM acceleration for Android integration tests; fail early with setup instructions if /dev/kvm is inaccessible. - Require all ANDROID_APK_SCP environment variables for deployment; fail early if any are missing. - Revert emulator boot timeouts to standard values (120s device / 60s boot) now that software emulation is disabled.
This commit is contained in:
@@ -3,9 +3,10 @@
|
||||
trap 'echo -e "\n🤷 🚨 🔥 Warning: A command has failed. Exiting the script. Line was ($0:$LINENO): $(sed -n "${LINENO}p" "$0" 2>/dev/null || true) 🔥 🚨 🤷 "; exit 3' ERR
|
||||
set -Eeuo pipefail
|
||||
|
||||
: "${ANDROID_APK_SCP_HOST:?ANDROID_APK_SCP_HOST is not set (add it to .env)}"
|
||||
: "${ANDROID_APK_SCP_USER:?ANDROID_APK_SCP_USER is not set (add it to .env)}"
|
||||
: "${ANDROID_APK_SCP_PATH:?ANDROID_APK_SCP_PATH is not set (add it to .env)}"
|
||||
if [ -z "${ANDROID_APK_SCP_HOST:-}" ] || [ -z "${ANDROID_APK_SCP_USER:-}" ] || [ -z "${ANDROID_APK_SCP_PATH:-}" ]; then
|
||||
echo "ERROR: ANDROID_APK_SCP_HOST, ANDROID_APK_SCP_USER, and ANDROID_APK_SCP_PATH must be set in .env"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
scp -C build/app/outputs/flutter-apk/app-release.apk "${ANDROID_APK_SCP_USER}@${ANDROID_APK_SCP_HOST}:${ANDROID_APK_SCP_PATH}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user