-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (33 loc) · 958 Bytes
/
Makefile
File metadata and controls
49 lines (33 loc) · 958 Bytes
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
.DEFAULT_GOAL := help
set-env: ## set nightly build
@rustup default nightly
clean: ## remove temp files
@rm -rf target
release: ## generate release version
@cargo build --release
build: ## generate debug version
@RUST_BACKTRACE=full RUSTUP_TOOLCHAIN=nightly cargo build
run: ## run project as dev
@RUST_BACKTRACE=1 cargo run
run-prod: ## run project as prod
@cargo run --release
test: ## run tests
@cargo test
watch-test: ## run tests with watch
@cargo watch -x test
watch-run: ## run project with watch
@cargo watch -x run
build-all: build release
dc-stop:
@docker-compose stop -t 0
dc-buid: dc-stop
@docker-compose build
dc-up: dc-buid
@docker-compose up app
dc-sh: dc-buid
@docker-compose run app sh
docker-build:
@docker build . -t rust-wiki:latest
.PHONY: help
help: ## show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'