mirror of
git://f0xx.org/android_cast
synced 2026-07-29 04:18:09 +03:00
orchestration beginning
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user