Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 50 additions & 1 deletion examples/barc-fable-game/BARC_LIVE_RECEIVER_PINS.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"oneOf": [
{ "$ref": "#/$defs/liveV1" },
{ "$ref": "#/$defs/tacticalV2" },
{ "$ref": "#/$defs/stockTacticalV3" }
{ "$ref": "#/$defs/stockTacticalV3" },
{ "$ref": "#/$defs/sharedStockTacticalV4" }
],
"$defs": {
"source": {
Expand Down Expand Up @@ -64,6 +65,54 @@
"source": { "$ref": "#/$defs/source" },
"files": { "type": "array", "minItems": 11, "items": { "$ref": "#/$defs/file" } }
}
},
"sharedStockTacticalV4": {
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"profile",
"protocolVersion",
"tacticalRevision",
"queueEvidenceScheme",
"guestAbiVersion",
"source",
"files",
"runtime"
],
"properties": {
"schema": {
"const": "fsbar.barc-live-receiver-pins/v4"
},
"profile": {
"const": "barc-live-tactical-stock-v1"
},
"protocolVersion": {
"const": 2
},
"tacticalRevision": {
"const": 2
},
"queueEvidenceScheme": {
"const": 2
},
"guestAbiVersion": {
"const": 1
},
"source": {
"$ref": "#/$defs/source"
},
"files": {
"type": "array",
"minItems": 11,
"items": {
"$ref": "#/$defs/file"
}
},
"runtime": {
"const": "shared-wasm-0.2.0"
}
}
}
}
}
10 changes: 9 additions & 1 deletion scripts/adopt-barc-preview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,23 @@ required=(
src/Broker.Browser.Client/dist/assets/barc-preview.css
src/Broker.Browser.Wasm/guest-worker.js
)
# Legacy archives keep their existing layout; shared archives prove the whole graph.
if [[ -d "$stage/src/Broker.Browser.SharedWasm" ]]; then
python3 "$repo_root/scripts/check-barc-shared-closure.py" "$stage" --manifest
required[2]=src/Broker.Browser.SharedWasm/_content/FS.GG.Wasm.Browser/module-worker.mjs
fi
if [[ -f "$stage/src/BARC-LIVE-PINS.json" ]]; then
jq -e '
(.schema == "fsbar.barc-live-receiver-pins/v1" or .schema == "fsbar.barc-live-receiver-pins/v2") and
(.schema == "fsbar.barc-live-receiver-pins/v1" or .schema == "fsbar.barc-live-receiver-pins/v2" or .schema == "fsbar.barc-live-receiver-pins/v3" or .schema == "fsbar.barc-live-receiver-pins/v4") and
([.files[] | select(.role == "manualGuest")] | length == 1) and
([.files[] | select(.role == "customGuest")] | length == 1)
' "$stage/src/BARC-LIVE-PINS.json" >/dev/null || {
echo "archive contains invalid live receiver pins" >&2
exit 2
}
if [[ "$(jq -r '.schema' "$stage/src/BARC-LIVE-PINS.json")" == fsbar.barc-live-receiver-pins/v4 ]]; then
python3 "$repo_root/scripts/check-barc-shared-closure.py" "$stage" --pins "$stage/src/BARC-LIVE-PINS.json" --manifest
fi
mapfile -t live_guests < <(
jq -r '.files[] | select(.role == "manualGuest" or .role == "customGuest") | .archivePath' \
"$stage/src/BARC-LIVE-PINS.json"
Expand Down
Loading
Loading