1
0

Centralize firmware configuration for tests

This commit is contained in:
2026-03-26 12:21:05 +01:00
parent b14a66ea3d
commit f166a9ffca
7 changed files with 39 additions and 18 deletions

View File

@@ -14,10 +14,7 @@ if [ -x "$LOCAL_GO_DIR/bin/go" ]; then
fi
FIRMWARE_CONFIG="$(cd .. && pwd)/tests/firmware-config.js"
PRIMARY=$(node -e "
const c = require('$FIRMWARE_CONFIG')[0];
console.log(JSON.stringify(c));
")
PRIMARY=$(node -e "console.log(JSON.stringify(require('$FIRMWARE_CONFIG').primary))")
PRIMARY_VERSION=$(echo "$PRIMARY" | jq -r '.version')
PATCHES_ZIP="$(cd .. && pwd)/web/src/patches/$(echo "$PRIMARY" | jq -r '.patches')"
CHECKSUMS=$(echo "$PRIMARY" | jq -r '.checksums | to_entries | map("\(.key)=\(.value)") | join(",")')