add a Makefile for the common commands, and a test reporter
The invocations in CLAUDE.md were correct but long, and retyping them is how flags get dropped. `make check` is the gate a change should pass: Yarn compiles, voice sheets are in sync, EditMode is green. `make test` and `make build` depend on a `lock` target that fails if the Editor has the project open, which removes the most common confusing failure. It filters out AssetImportWorker children, which are not a second Editor. tools/ci/report_tests.py parses the NUnit results and exits non-zero on failure, because Unity documents no common exit-code definition across the components under test — the XML is the authority, not $?. `make merge-driver` configures UnityYAMLMerge for the .gitattributes rules added earlier. Note the binary lives in the Editor bundle under Contents/Helpers, not Contents/Tools as most guides say; there is no Tools directory in Unity 6 on macOS. Also ignores the local .test-results/ and build/ output. Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
@@ -58,6 +58,36 @@ AI Navigation 2.0.14, ProBuilder 6.1.2, Test Framework 1.7.0. Yarn Spinner is an
|
||||
|
||||
---
|
||||
|
||||
## 2b. Everyday commands
|
||||
|
||||
A `Makefile` at the repo root wraps everything in this document. Prefer it — the exact
|
||||
invocations live there instead of being retyped.
|
||||
|
||||
```bash
|
||||
make # list targets
|
||||
make check # yarn + voice sheets + EditMode — run this before committing
|
||||
make test # EditMode suite, with a readable summary
|
||||
make yarn # compile every Yarn script (seconds, no Unity)
|
||||
make build # macOS player into build/
|
||||
make lock # fail if the Editor has the project open
|
||||
```
|
||||
|
||||
`make test` and `make build` refuse to run while the Editor is open, which removes the most
|
||||
common way these commands fail confusingly.
|
||||
|
||||
### Merge driver — one-time per machine
|
||||
|
||||
`.gitattributes` marks Unity YAML for `unityyamlmerge`. Git needs to be told what that is, or
|
||||
it falls back to a line-oriented text merge that can produce a scene Unity still loads and that
|
||||
is quietly wrong:
|
||||
|
||||
```bash
|
||||
make merge-driver
|
||||
```
|
||||
|
||||
That points git at `UnityYAMLMerge` inside the Editor bundle (`Contents/Helpers/`, not
|
||||
`Contents/Tools/` — the path in most online guides is wrong for Unity 6 on macOS).
|
||||
|
||||
## 3. Unity from the command line
|
||||
|
||||
### 3.0 Two different tools, both present
|
||||
|
||||
Reference in New Issue
Block a user