build: add a make build target, drop README's raw go build (closes #19)
The executable builds to build/rogue. All generated artifacts go under build/, which .gitignore covers as a whole; a target writing outside it can commit its output. build is in neither check nor test: check stays fmt-check lint test and still writes nothing into the working tree. README's "Building and running" block and the run examples use ./build/rogue, and no raw go invocation is left in the file. Verified: make build writes build/rogue and git status stays clean; GOFLAGS=-count=1 make check green in 34s with the lint layer executing (21.9s, "0 issues.", not CACHED) and the suite running for real (cmd/rogue 1.027s, game 3.450s), git status clean afterwards.
This commit is contained in:
18
README.md
18
README.md
@@ -21,19 +21,19 @@ original program structure and the design of this port.
|
||||
Requires Go 1.25 or later and a terminal at least 80x24.
|
||||
|
||||
```bash
|
||||
go build ./cmd/rogue
|
||||
./rogue
|
||||
make build
|
||||
./build/rogue
|
||||
```
|
||||
|
||||
```bash
|
||||
# Restore a saved game
|
||||
./rogue ~/rogue.save
|
||||
./build/rogue ~/rogue.save
|
||||
|
||||
# View high scores
|
||||
./rogue -s
|
||||
./build/rogue -s
|
||||
|
||||
# Test the death screen (demo mode)
|
||||
./rogue -d
|
||||
./build/rogue -d
|
||||
```
|
||||
|
||||
## In-game commands
|
||||
@@ -57,7 +57,7 @@ Press `?` in game for the full list.
|
||||
export ROGUEOPTS="name=YourName,terse,jump,fruit=mango"
|
||||
|
||||
# Wizard (debug) mode, with a reproducible dungeon
|
||||
ROGUE_WIZARD=1 SEED=12345 ./rogue
|
||||
ROGUE_WIZARD=1 SEED=12345 ./build/rogue
|
||||
```
|
||||
|
||||
The scoreboard is kept in `~/.rogue.scores`. Save files are Go gob snapshots
|
||||
@@ -80,9 +80,9 @@ For development, the `Makefile` wraps the toolchain: `make fmt` (gofmt +
|
||||
prettier), `make lint` (`script/lint`, which runs golangci-lint inside the
|
||||
pinned container built from `Dockerfile.lint` — it is never installed on the
|
||||
host, so docker is required), `make test` (the suite, under the race detector
|
||||
with coverage and a timeout), and `make check` (all three). Use the targets
|
||||
rather than invoking `go test` directly — they carry the flags the project
|
||||
relies on.
|
||||
with coverage and a timeout), `make check` (all three), and `make build` (the
|
||||
executable, into the git-ignored `build/`). Use the targets rather than the
|
||||
toolchain directly — they carry the flags the project relies on.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Reference in New Issue
Block a user