build: add the Makefile command surface (D-27)
Every repo gets one at the root: help, plus test and lint where those exist. The point is that a target name means the same thing in every repo, so an agent or a person can act without reading the repo first. Paths resolve here rather than in callers (D-10). python3 on this host is 3.8 and cannot parse these sources, and a bare pytest or ruff resolves only in a login shell — so both are named explicitly through the venv, and a missing venv fails with the command to fix it rather than a bare no-such-file. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
# tatlock-ui — the repo's command surface (D-27).
|
||||
#
|
||||
# Flutter rather than Python, so there is no venv and no PYTHON here. The
|
||||
# reason the targets still exist under these names is the point of D-27: an
|
||||
# agent or a person can run `make test` in any repo in this workspace without
|
||||
# first working out which stack it is.
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
.PHONY: help
|
||||
help: ## Show this help
|
||||
@grep -hE '^[a-z][a-z0-9_-]*:.*?## ' $(MAKEFILE_LIST) \
|
||||
| awk 'BEGIN{FS=":.*?## "}{printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
|
||||
|
||||
.PHONY: setup
|
||||
setup: ## Fetch package dependencies
|
||||
flutter pub get
|
||||
|
||||
.PHONY: test
|
||||
test: ## Run the widget and unit tests
|
||||
flutter test
|
||||
|
||||
.PHONY: lint
|
||||
lint: ## Static analysis (analysis_options.yaml at the repo root)
|
||||
flutter analyze
|
||||
|
||||
.PHONY: build
|
||||
build: ## Release build for the web target
|
||||
flutter build web --release
|
||||
|
||||
.PHONY: clean
|
||||
clean: ## Remove build artefacts and the pub cache for this project
|
||||
flutter clean
|
||||
Reference in New Issue
Block a user