1
0
mirror of git://f0xx.org/android_cast synced 2026-07-29 04:18:09 +03:00

orchestration beginning

This commit is contained in:
Anton Afanasyeu
2026-05-30 17:55:36 +02:00
parent 95f521c4a0
commit a9a9590698
31 changed files with 1238 additions and 27 deletions

View File

@@ -2,8 +2,9 @@
# Generate v0 OTA artifacts for one APK (stdout = channel stable.json).
#
# Usage:
# ./scripts/generate-ota-v0.sh path/to/app-release.apk https://host[:port] [out-dir]
# ./scripts/generate-ota-v0.sh path/to/app-release.apk https://host[:port] [out-dir] [channel]
#
# 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/00/00.MM/00.MM.mm/android_cast_00.MM.mm.BB_manifest.json
@@ -15,6 +16,7 @@ set -euo pipefail
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}"
if [[ ! -f "$apk" ]]; then
echo "APK not found: $apk" >&2
@@ -115,7 +117,8 @@ cat >"${rel_dir}/${manifest_name}" <<EOF
}
EOF
cat >"${rel_root}/channel/stable.json" <<EOF
channel_file="${rel_root}/channel/${channel}.json"
cat >"${channel_file}" <<EOF
{
"schema": "v0",
"manifestUrl": "${manifest_url}"
@@ -123,6 +126,6 @@ cat >"${rel_root}/channel/stable.json" <<EOF
EOF
echo "Published v0 OTA under ${out_dir}/v0/ota" >&2
echo "Channel: ${host_base%/}/v0/ota/channel/stable.json" >&2
echo "Channel: ${host_base%/}/v0/ota/channel/${channel}.json" >&2
echo "Bundle: ${bundle_url} (${bundle_size} bytes)" >&2
cat "${rel_root}/channel/stable.json"
cat "${channel_file}"