Makefile (1270B)
1 APP_NAME := patina-installer 2 3 .DEFAULT_GOAL := help 4 5 .PHONY: help run build test check screenshot gif clean 6 7 help: ## Show this help 8 @echo "Usage: make <target>" 9 @echo 10 @awk 'BEGIN { FS = ":.*## " } /^[a-z-]+:.*## / { printf " \033[1m%-14s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST) 11 12 run: ## Run on the mock (three fake drives, a fake install), in a window 13 PATINA_INSTALLER_MOCK=1 PATINA_INSTALLER_SIZE=1280x800 cargo run 14 15 build: ## Build a release binary 16 cargo build --release 17 18 test: ## Run the tests 19 cargo test 20 21 check: test ## Run the tests and clippy, as before a commit 22 cargo clippy --all-targets -- -D warnings 23 24 screenshot: ## Regenerate docs/screenshot-*.png from the mock (needs a desktop) 25 @mkdir -p docs 26 for s in choose confirm installing done failed; do \ 27 PATINA_INSTALLER_MOCK=1 PATINA_INSTALLER_SIZE=1280x800 PATINA_INSTALLER_DEMO=$$s PATINA_INSTALLER_SCREENSHOT=docs/screenshot-$$s.png cargo run; done 28 29 gif: ## Regenerate docs/flask.gif from the flask's frames (no window) 30 cargo run -q --example flask_gif -- target/flask-frames 31 ffmpeg -y -loglevel error -framerate 12 -pattern_type glob -i "target/flask-frames/f*.png" \ 32 -vf "split[a][b];[a]palettegen[p];[b][p]paletteuse" -loop 0 docs/flask.gif 33 34 clean: ## Remove build output 35 cargo clean