1
0
mirror of git://f0xx.org/android_cast synced 2026-07-29 03:38:52 +03:00

Add gzip-aware crash upload and OTA staging build/deploy tooling.

This restores the interrupted stash work on a dedicated feature branch, including backend decoding support, Dockerized build scripts, and staging channel artifacts for end-to-end OTA validation.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-06-02 16:08:46 +02:00
parent 9f9d617730
commit 097c0790b8
18 changed files with 258 additions and 11 deletions

View File

@@ -4,9 +4,12 @@
# Usage:
# ./scripts/generate-ota-v0.sh path/to/app-release.apk https://host[:port] [out-dir] [channel]
#
# channel — JSON file under v0/ota/channel/ (default: stable). Use staging for QA.
# RELEASE_NOTES — optional env, embedded in manifest.
#
# channel — JSON under v0/ota/channel/ (stable, staging, dev, nightly, or custom)
# Writes under out-dir (default: ./ota-publish):
# v0/ota/channel/stable.json
# v0/ota/channel/<channel>.json
# v0/ota/00/00.MM/00.MM.mm/android_cast_00.MM.mm.BB_manifest.json
# v0/ota/00/00.MM/00.MM.mm/android_cast_00.MM.mm.BB_sign.json
# v0/ota/00/00.MM/00.MM.mm/android_cast_00.MM.mm.BB.otapkg
@@ -17,6 +20,19 @@ apk="${1:?APK path required}"
host_base="${2:?Base URL required, e.g. https://192.168.1.1:8080}"
out_dir="${3:-ota-publish}"
channel="${4:-stable}"
release_notes="${RELEASE_NOTES:-}"
json_notes() {
if command -v jq >/dev/null 2>&1; then
jq -n --arg n "$release_notes" '$n'
else
local esc="${release_notes//\\/\\\\}"
esc="${esc//\"/\\\"}"
esc="${esc//$'\n'/\\n}"
esc="${esc//$'\r'/}"
printf '"%s"' "$esc"
fi
}
NOTES_JSON="$(json_notes)"
if [[ ! -f "$apk" ]]; then
echo "APK not found: $apk" >&2
@@ -84,7 +100,7 @@ cat >"${rel_dir}/${manifest_name}" <<EOF
"signUrl": "${sign_url}",
"sizeBytes": ${apk_size},
"mandatory": false,
"releaseNotes": ""
"releaseNotes": ${NOTES_JSON}
}
EOF
@@ -113,7 +129,7 @@ cat >"${rel_dir}/${manifest_name}" <<EOF
"bundleSha256": "${bundle_sha256}",
"bundleSizeBytes": ${bundle_size},
"mandatory": false,
"releaseNotes": ""
"releaseNotes": ${NOTES_JSON}
}
EOF