lychee/Makefile

66 lines
1.5 KiB
Makefile
Raw Permalink Normal View History

2020-12-02 22:43:05 +00:00
# Needed SHELL since I'm using zsh
SHELL := /usr/bin/env bash
2020-12-02 22:43:05 +00:00
IMAGE_NAME := "lycheeverse/lychee"
.PHONY: help
help: ## This help message
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
.PHONY: docker-build
docker-build: ## Build Docker image
docker build -t $(IMAGE_NAME) .
.PHONY: docker-run
docker-run: ## Run Docker image
docker run $(IMAGE_NAME)
.PHONY: docker-push
docker-push: ## Push image to Docker Hub
docker push $(IMAGE_NAME)
.PHONY: clean
clean: ## Clean up build artifacts
cargo clean
2021-06-22 22:14:11 +00:00
.PHONY: build
2020-12-02 22:43:05 +00:00
build: ## Build Rust code locally
cargo build
2021-06-22 22:14:11 +00:00
.PHONY: install
install: ## Install project locally
2022-01-05 17:25:55 +00:00
cargo install --path lychee-bin --locked
2021-06-22 22:14:11 +00:00
2020-12-02 22:43:05 +00:00
.PHONY: run
run: ## Run project locally
2020-12-02 22:43:05 +00:00
cargo run
2022-01-12 00:05:41 +00:00
.PHONY: docs
docs: ## Generate and show documentation
cargo doc --open
2022-09-27 16:17:37 +00:00
.PHONY: lint
lint: ## Run linter
cargo fmt --all -- --check
2022-09-27 16:17:37 +00:00
cargo clippy --all-targets --all-features -- -D warnings
.PHONY: test
test: ## Run tests
cargo nextest run --all-targets --all-features
cargo nextest run
cargo test --doc
.PHONY: doc
doc: ## Open documentation
cargo doc --open
.PHONY: screencast
screencast: ## Create a screencast for the docs
termsvg rec --command=assets/screencast.sh recording.asc
2024-06-14 23:27:52 +00:00
termsvg export --minify recording.asc --output=assets/screencast.svg
rm recording.asc
.PHONY: verify
verify: ## Verify the MSRV
cargo msrv --path lychee-lib verify
cargo msrv --path lychee-bin verify