CI deployed every Steam game from scratch on each run, downloading the whole game from Steam each time. scripts/boot-test.sh now runs the new `gbrgames boot-test ID`, the builder's own deploy path: the same payload and node-agent BootTest, but Steam games start from the cache volume (gbr-steamcache-<app>, kept by RUNNER.md's prune). The cache is updated at most once a day (a timestamp in the cache volume, not copied into servers), so a repeat run within a day doesn't ask Steam for an update at all; the node-agent's own install still checks the files and fetches anything newer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
68 lines
2.9 KiB
Go
68 lines
2.9 KiB
Go
// Command gbrgames validates the game templates in this repo and imports them from a panel export.
|
|
//
|
|
// go run ./cmd/gbrgames validate # check every games/<id>/game.yaml (+ test.yaml)
|
|
// go run ./cmd/gbrgames import export.json # write games/<id>/ from GET /api/v1/admin/games
|
|
// go run ./cmd/gbrgames export -out p.json # build the games_published payload CI sends to the panel
|
|
// go run ./cmd/gbrgames boottest-payload ID # build the deploy message the node-agent's BootTest runs
|
|
// go run ./cmd/gbrgames boot-test ID # boot-test a game with the node-agent, as CI does (Steam cache)
|
|
// go run ./cmd/gbrgames inspect-image -game ID # read the image's facts and check the template against them
|
|
// go run ./cmd/gbrgames first-boot -game ID # start the server once, untouched; record its log and files
|
|
// go run ./cmd/gbrgames draft -name N -image I # have an AI model write a new game's template from those facts
|
|
// go run ./cmd/gbrgames research -name N # find how a game's server runs: variants, images, Steam app
|
|
// go run ./cmd/gbrgames build -name N -variant V # first boot, draft, and boot the draft until it works
|
|
// go run ./cmd/gbrgames repair -id ID # fix an existing template that no longer boots
|
|
// go run ./cmd/gbrgames eval -ids all # build known games blind and score the drafts
|
|
// go run ./cmd/gbrgames worker # take research/build/repair jobs from the panel (see BUILDER.md)
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
if len(os.Args) < 2 {
|
|
usage()
|
|
}
|
|
var err error
|
|
switch os.Args[1] {
|
|
case "validate":
|
|
err = runValidate(os.Args[2:])
|
|
case "import":
|
|
err = runImport(os.Args[2:])
|
|
case "export":
|
|
err = runExport(os.Args[2:])
|
|
case "boottest-payload":
|
|
err = runBootTestPayload(os.Args[2:])
|
|
case "boot-test":
|
|
err = runBootTest(os.Args[2:])
|
|
case "inspect-image":
|
|
err = runInspectImage(os.Args[2:])
|
|
case "first-boot":
|
|
err = runFirstBoot(os.Args[2:])
|
|
case "draft":
|
|
err = runDraft(os.Args[2:])
|
|
case "research":
|
|
err = runResearch(os.Args[2:])
|
|
case "build":
|
|
err = runBuild(os.Args[2:])
|
|
case "repair":
|
|
err = runRepair(os.Args[2:])
|
|
case "eval":
|
|
err = runEval(os.Args[2:])
|
|
case "worker":
|
|
err = runWorker(os.Args[2:])
|
|
default:
|
|
usage()
|
|
}
|
|
if err != nil {
|
|
fmt.Fprintln(os.Stderr, "error:", err)
|
|
os.Exit(1)
|
|
}
|
|
}
|
|
|
|
func usage() {
|
|
fmt.Fprintln(os.Stderr, "usage: gbrgames validate [-games DIR] | import [-games DIR] [-all] EXPORT.json | export [-repo R] [-commit SHA] [-out FILE] | boottest-payload [-out FILE] ID | boot-test ID | inspect-image [-game ID] [-json] [-no-pull] [IMAGE] | first-boot [-game ID | -image IMAGE] [-env K=V] [-max D] [-quiet D] [-out DIR] | draft -name NAME -image IMAGE [-steam-app ID] [-first-boot REPORT] [-provider ollama|gemini] [-model M] | research -name NAME [-notes N] [-out FILE] | build -name NAME -variant JSON|@FILE [-out FILE] | repair -id ID [-reason R] | eval [-ids all] [-out eval.md] | worker [-once]")
|
|
os.Exit(2)
|
|
}
|