chore(android): publish companion as raw APK instead of zip
Serve the companion download as a plain .apk so a phone installs it straight from the link/QR with no unzip step. Repoint the in-app download URL, the ship + publish scripts, and the pre-push hook at archipelago-companion.apk, and drop the legacy .apk.zip. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
e825bbed73
commit
5c43e12782
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build the Archipelago companion debug APK and stage it as the served download
|
||||
# at neode-ui/public/packages/archipelago-companion.apk.zip.
|
||||
# at neode-ui/public/packages/archipelago-companion.apk (a plain APK, so a phone
|
||||
# can install it straight from the link — no unzip step).
|
||||
#
|
||||
# Run manually, or automatically via the pre-push hook (.githooks/pre-push).
|
||||
set -euo pipefail
|
||||
@@ -21,15 +22,16 @@ echo "publish-companion-apk: building debug APK…" >&2
|
||||
( cd Android && JAVA_HOME="$JAVA" ANDROID_HOME="$SDK" ./gradlew -q :app:assembleDebug )
|
||||
|
||||
APK="Android/app/build/outputs/apk/debug/app-debug.apk"
|
||||
DEST="neode-ui/public/packages/archipelago-companion.apk.zip"
|
||||
DEST="neode-ui/public/packages/archipelago-companion.apk"
|
||||
OLD_ZIP="neode-ui/public/packages/archipelago-companion.apk.zip"
|
||||
mkdir -p "$(dirname "$DEST")"
|
||||
|
||||
TMP="$(mktemp -d)"
|
||||
cp "$APK" "$TMP/app-debug.apk"
|
||||
# -X drops platform-specific extra fields for a stabler archive.
|
||||
( cd "$TMP" && zip -q -X archipelago-companion.apk.zip app-debug.apk )
|
||||
cp "$TMP/archipelago-companion.apk.zip" "$DEST"
|
||||
rm -rf "$TMP"
|
||||
cp "$APK" "$DEST"
|
||||
|
||||
# Drop the legacy zipped artifact so the served download is the raw APK only.
|
||||
if [ -f "$OLD_ZIP" ]; then
|
||||
git rm -q --ignore-unmatch "$OLD_ZIP" 2>/dev/null || rm -f "$OLD_ZIP"
|
||||
fi
|
||||
|
||||
git add "$DEST"
|
||||
echo "publish-companion-apk: staged $DEST" >&2
|
||||
|
||||
Reference in New Issue
Block a user