.PHONY: all build build-release install clean test check fmt fmt-check clippy lint plugin-check publish-dry-run run help
all: check build test
help:
@printf "Targets:\n"
@printf " make build Build debug binary\n"
@printf " make build-release Build release binary\n"
@printf " make install Install from local checkout\n"
@printf " make clean Remove build artifacts\n"
@printf " make test Run tests\n"
@printf " make check Run fmt, tests, clippy, and publish dry-run\n"
@printf " make fmt Format source\n"
@printf " make fmt-check Check formatting\n"
@printf " make clippy Run clippy with warnings denied\n"
@printf " make plugin-check Check tmux plugin entrypoint\n"
@printf " make publish-dry-run Verify crates.io package\n"
@printf " make run ARGS=... Run tmux-expose with arguments\n"
build:
cargo build
build-release:
cargo build --release
install:
cargo install --path . --locked
clean:
cargo clean
test:
cargo test
check: fmt-check test clippy plugin-check publish-dry-run
fmt:
cargo fmt
fmt-check:
cargo fmt --check
clippy:
cargo clippy --all-targets --all-features -- -D warnings
lint: fmt-check clippy
plugin-check:
test -x tmux.expose.tmux
bash -n tmux.expose.tmux
bash tests/plugin_entrypoint_test.sh
grep -q 'width="$${width:-100%}"' tmux.expose.tmux
grep -q 'height="$${height:-100%}"' tmux.expose.tmux
grep -q 'anchor="$${anchor:-center}"' tmux.expose.tmux
publish-dry-run:
cargo publish --dry-run --allow-dirty
run:
cargo run -- $(ARGS)