Skip to content

Run Windows games on Apple Silicon — free, open source, with an open compatibility database that tells you what actually works.

recipes: a bare-date lastVerified decodes instead of dropping the recipe; release.sh validates every bundled recipe with the CLI before building

Gauthier Piarrette3081620ee6e6
diff --git a/Scripts/release.sh b/Scripts/release.sh
index 2bc99e0..dd8f5b6 100755
--- a/Scripts/release.sh
+++ b/Scripts/release.sh
@@ -106,6 +106,18 @@ case "$ci" in
*) echo "WARNING: no finished push CI run for HEAD yet (${ci:-none}); it should be green before this release is promoted." >&2 ;;
esac
+# Every recipe the app will bundle must decode with this very build of the CLI. A recipe the app
+# cannot decode is dropped silently at load, so Play never applies it: 0.9.8 shipped the Metaphor
+# recipe with a bare-date lastVerified and the engine it asks for never reached anyone (2026-09-12).
+RECIPES_DIR="../highball-db/recipes"; [ -d "$RECIPES_DIR" ] || RECIPES_DIR=".build/highball-db/recipes"
+if [ -d "$RECIPES_DIR" ]; then
+ swift build -c debug --product highball >/dev/null 2>&1 || { echo "release: debug CLI build failed" >&2; exit 1; }
+ for f in "$RECIPES_DIR"/launchers/*.json "$RECIPES_DIR"/games/*.json "$RECIPES_DIR"/tweaks/*.json; do
+ [ -f "$f" ] || continue
+ .build/debug/highball recipe show "$f" >/dev/null 2>/tmp/hb-recipe-err || { echo "release: the CLI cannot decode $f: $(head -c 300 /tmp/hb-recipe-err)" >&2; exit 1; }
+ done
+ echo "release: every recipe in $RECIPES_DIR decodes with this build"
+fi
Scripts/make-app.sh release "$VERSION"
ZIP="dist/Highball-$VERSION.zip"
ditto -c -k --keepParent dist/Highball.app "$ZIP"
diff --git a/Sources/HighballKit/Recipe.swift b/Sources/HighballKit/Recipe.swift
index 2d30beb..7283782 100644
--- a/Sources/HighballKit/Recipe.swift
+++ b/Sources/HighballKit/Recipe.swift
@@ -219,6 +219,27 @@ public struct Recipe: Codable, Sendable, Identifiable {
public var macos: String
public var chip: String
public var result: String
+
+ public init(date: String, engine: String, macos: String, chip: String, result: String) {
+ self.date = date; self.engine = engine; self.macos = macos; self.chip = chip; self.result = result
+ }
+
+ /// A recipe's lastVerified is an object, a row's is a date string. A recipe written with the
+ /// row's shape must not vanish from the app: 0.9.8 shipped the Metaphor recipe as a bare
+ /// date and every bundled load of it failed silently, so Play never moved the environment
+ /// to the engine the recipe asks for (2026-09-12). A bare string is taken as the date.
+ public init(from decoder: Decoder) throws {
+ if let single = try? decoder.singleValueContainer(), let date = try? single.decode(String.self) {
+ self.init(date: date, engine: "", macos: "", chip: "", result: "")
+ return
+ }
+ let c = try decoder.container(keyedBy: CodingKeys.self)
+ self.init(date: try c.decode(String.self, forKey: .date),
+ engine: try c.decodeIfPresent(String.self, forKey: .engine) ?? "",
+ macos: try c.decodeIfPresent(String.self, forKey: .macos) ?? "",
+ chip: try c.decodeIfPresent(String.self, forKey: .chip) ?? "",
+ result: try c.decodeIfPresent(String.self, forKey: .result) ?? "")
+ }
}
public var id: String