fix(audio-rooms): clone nostrnests with submodules so docker compose finds moq/
The harness was running plain `git clone`, but docker-compose-moq.yml references `./moq` (kixelated/moq-rs) and `./moq-auth` as build contexts via git submodules. Without --recurse-submodules the directories don't exist and `docker compose up -d` fails with: unable to prepare context: path '<cache>/nests/moq' not found Fix: clone with --recurse-submodules on first run, and sync submodules after every fetch+checkout so the working tree matches whatever revision pin the checked-out commit declares.
This commit is contained in:
+9
-2
@@ -152,12 +152,19 @@ class NostrNestsHarness private constructor(
|
||||
val rev = System.getProperty("nestsInteropRev") ?: DEFAULT_REVISION
|
||||
val target = cacheRoot().resolve("nests").toFile()
|
||||
if (!target.exists()) {
|
||||
runProcess(cacheRoot().toFile(), "git", "clone", REPO_URL, "nests")
|
||||
// Recurse-submodules pulls in the `moq` (kixelated/moq-rs)
|
||||
// and `moq-auth` build contexts that docker-compose-moq.yml
|
||||
// references via `build: ./moq` / `./moq-auth`. Without
|
||||
// them docker compose fails with "unable to prepare
|
||||
// context: path '<repo>/moq' not found".
|
||||
runProcess(cacheRoot().toFile(), "git", "clone", "--recurse-submodules", REPO_URL, "nests")
|
||||
}
|
||||
// Always fetch + checkout the requested revision so test runs
|
||||
// are reproducible even if `main` advances.
|
||||
// are reproducible even if `main` advances. Sync submodules to
|
||||
// whatever the checked-out commit pins.
|
||||
runProcess(target, "git", "fetch", "origin", "--quiet")
|
||||
runProcess(target, "git", "checkout", "--quiet", rev)
|
||||
runProcess(target, "git", "submodule", "update", "--init", "--recursive")
|
||||
return target
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user