forked from lycheeverse/lychee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (39 loc) · 1.19 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Needed SHELL since I'm using zsh
SHELL := /bin/bash
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: build
build: ## Build Rust code locally
cargo build
.PHONY: install
install: ## Install project locally
cargo install --path lychee-bin --locked
.PHONY: run
run: ## Run project locally
cargo run
.PHONY: docs
docs: ## Generate and show documentation
cargo doc --open
.PHONY: lint
lint: ## Run linter
cargo clippy --all-targets --all-features -- -D warnings
.PHONY: test
test: ## Run tests
cargo test --all-targets --all-features
.PHONY: doc
doc: ## Open documentation
cargo doc --open
.PHONY: screencast
screencast: ## Create a screencast for the docs
svg-term --command 'assets/screencast.sh' --out 'assets/screencast.svg' --width 100 --padding 10 --window