-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathMakefile
46 lines (31 loc) · 918 Bytes
/
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
%:
@:
.PHONY: all build test check debug run clean help doc
args = `arg="$(filter-out $@,$(MAKECMDGOALS))" && echo $${arg:-${1}}`
CARGO = cargo
all: test build
build:
${CARGO} build
cp ../target/release/mithril-client .
run: build
@./mithril-client $(call args,defaultstring)
debug:
@${CARGO} run -- -vvv $(call args,defaultstring)
test:
${CARGO} test
check:
${CARGO} check --release --all-features --all-targets
${CARGO} clippy --release --all-features --all-targets
${CARGO} fmt --check
clean:
${CARGO} clean
help:
@${CARGO} run -- -h
doc:
${CARGO} doc --no-deps --open
docker-build:
cd ../ && docker build -t mithril/mithril-client -f mithril-client-cli/Dockerfile .
docker-build-ci: build
cd ../ && docker build -t mithril/mithril-client -f mithril-client-cli/Dockerfile.ci --build-arg DOCKER_IMAGE_FROM .
docker-run:
docker run --rm --name='mithril-client' mithril/mithril-client