diff --git a/packaging/ota/publish-manifest.sh b/packaging/ota/publish-manifest.sh index cd4d4499..8c59699f 100755 --- a/packaging/ota/publish-manifest.sh +++ b/packaging/ota/publish-manifest.sh @@ -181,7 +181,7 @@ if [ -f "$OLD" ]; then OLD_VERSION="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1])).get("version",""))' "$OLD" 2>/dev/null || true)" if [ "$OLD_VERSION" = "$VERSION" ]; then for p in mac windows; do - carried="$(python3 -c 'import json,sys; e=json.load(open(sys.argv[1])).get("platforms",{}).get(sys.argv[2]); print(" ".join([e["url"],e["sha256"],str(e["size"]),e["kind"],e.get("ui_version","")]).rstrip() if e else "")' "$OLD" "$p" 2>/dev/null || true)" + carried="$(python3 -c 'import json,sys; e=json.load(open(sys.argv[1])).get("platforms",{}).get(sys.argv[2]); print(" ".join([e["url"],e["sha256"],str(e["size"]),e["kind"],e.get("ui_version") or "-"]) if e else "")' "$OLD" "$p" 2>/dev/null || true)" if [ "$p" = mac ] && [ -z "$MAC_ENTRY" ] && [ -n "$carried" ]; then MAC_ENTRY="$carried"; echo "mac: carried over from the current manifest"; fi if [ "$p" = windows ] && [ -z "$WIN_ENTRY" ] && [ -n "$carried" ]; then WIN_ENTRY="$carried"; echo "windows: carried over from the current manifest"; fi done @@ -268,8 +268,9 @@ def entry(s, ui_version=None): parts = s.split() url, sha, size, kind = parts[:4] e = {"url": url, "sha256": sha, "size": int(size), "kind": kind} - # the version pair (tools/ui-ota/pair-check.mjs): the interface version of the UI tree this entry was built from - uv = parts[4] if len(parts) > 4 else ui_version + # the version pair (tools/ui-ota/pair-check.mjs): a NEW entry is built from this tree and carries its interface version; + # a carried entry keeps its own ("-" = it had none, and none is stamped: the tree's version is not its proof) + uv = (None if parts[4] == "-" else parts[4]) if len(parts) > 4 else ui_version if uv: e["ui_version"] = uv return e m = {