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
VERSION := latest
IMG_NAME := deepu105/kdash
IMAGE := ${IMG_NAME}:${VERSION}
default: run
## Run all tests
test:
@cargo check && cargo test
## Builds the app for current os-arch
build:
@make test && cargo clean && cargo build --release
## Runs the app
run:
@cargo fmt && make lint && cargo run
## Run clippy
lint:
@find . | grep '\.\/src\/.*\.rs$$' | xargs touch && cargo clippy --all-targets --workspace
## Force Run clippy
lint-force:
@cargo clean && cargo clippy
## Fix lint
lint-fix:
@cargo fix
## Run format
fmt:
@cargo fmt
## Build a Docker Image
docker:
@DOCKER_BUILDKIT=1 docker build --rm -t ${IMAGE} .
## Run Docker Image locally
docker-run:
@docker run --rm ${IMAGE}