clone

fifteen puzzle games for the terminal, with daily puzzles, weekly ladders and xp, built on bubble tea

chore/regenerate-vhs-gifs
puzzletea / justfile
justfile 1.8K
1version := `git describe --tags --always --dirty 2>/dev/null || echo "dev"`2ldflags := "-X github.com/FelineStateMachine/puzzletea/cmd.Version=" + version + " -X github.com/FelineStateMachine/puzzletea/packexport.Version=" + version34# Build the binary (default recipe).5build:6 go build -ldflags '{{ldflags}}' -o puzzletea78# Build and run.9run: build10 ./puzzletea1112# Run all tests.13test:14 go test ./...1516# Run tests in short mode (skips slow generator tests).17test-short:18 go test -short ./...1920# Run linter.21lint:22 golangci-lint run ./...2324check:25 just lint26 just diagnostic2728diagnostic:29 rg --files -g '*.go' -0 | xargs -0 gopls check -severity=hint3031# Format all Go files with gofumpt.32fmt:33 gofumpt -w .3435# Render visual fixture output for one game or the whole suite.36render game="all":37 @if [ "{{game}}" = "all" ]; then \38 find . -path '*/testdata/visual_states.jsonl' | sort | while read -r file; do \39 printf '== %s ==\n' "$file"; \40 go run . test "$file"; \41 printf '\n'; \42 done; \43 else \44 go run . test "{{game}}/testdata/visual_states.jsonl"; \45 fi4647# Tidy module dependencies.48tidy:49 go mod tidy5051# Install the binary to $GOPATH/bin.52install:53 go install -ldflags '{{ldflags}}'5455# Remove build artifacts.56clean:57 rm -f puzzletea58 rm -rf dist5960# Generate VHS GIFs (requires vhs: https://github.com/charmbracelet/vhs).61vhs: build62 vhs vhs/menu.tape63 vhs vhs/fillomino.tape64 vhs vhs/rippleeffect.tape65 vhs vhs/nonogram.tape66 vhs vhs/nurikabe.tape67 vhs vhs/sudoku.tape68 vhs vhs/sudokurgb.tape69 vhs vhs/spellpuzzle.tape70 vhs vhs/shikaku.tape71 vhs vhs/takuzu.tape72 vhs vhs/wordsearch.tape73 vhs vhs/hashiwokakero.tape74 vhs vhs/help.tape75 vhs vhs/hitori.tape76 vhs vhs/lightsout.tape77 vhs vhs/netwalk.tape78 vhs vhs/stats.tape