# SPDX-FileCopyrightText: Amolith # # SPDX-License-Identifier: CC0-1.0 .PHONY: all fmt fmt-check lint check test test-quiet ci dist clean install all: fmt lint check test-quiet # Bundle all modules into single distributable file dist: dist/wt dist/wt: src/main.lua $(wildcard src/wt/*.lua) $(wildcard src/wt/cmd/*.lua) scripts/bundle.lua @mkdir -p dist lua scripts/bundle.lua > dist/wt chmod +x dist/wt clean: rm -rf dist install: dist/wt @mkdir -p ~/.local/bin cp dist/wt ~/.local/bin/ fmt: lx fmt fmt-check: lx fmt --check lint: lx lint check: lx check test: lx test # For agents: show full output only on failure, otherwise just summary test-quiet: @output=$$(lx test 2>&1); rc=$$?; \ if [ $$rc -eq 0 ]; then \ echo "$$output" | tail -1; \ else \ echo "$$output"; \ fi; \ exit $$rc ci: fmt-check lint check test