cargo ?= cargo
rustup ?= rustup
help: Makefile
@echo
@echo " Choose a command run in ftt:"
@echo
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
@echo
config:
$(rustup) component add rustfmt
doc:
$(cargo) doc
build:
@echo "\n>> ============= Cargo Build ============= <<"
rm -rf target
$(cargo) build --verbose --all
release:
@echo "\n>> ============= Cargo Release ============= <<"
rm -rf target
$(cargo) build --release --verbose
publish:
@echo "\n>> ============= Cargo Publish ============= <<"
$(cargo) publish
test:
@echo "\n>> ============= Cargo Test ============= <<"
$(cargo) test --verbose --all
fmt:
@echo "\n>> ============= Cargo Format ============= <<"
$(cargo) fmt
fmt_check:
@echo "\n>> ============= Cargo Format Check ============= <<"
$(cargo) fmt -- --check
run:
@echo "\n>> ============= Cargo Run ============= <<"
$(cargo) run
ci: build test fmt_check
@echo "\n>> ============= All quality checks passed ============= <<"
.PHONY: help