-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
50 lines (38 loc) · 1.13 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
TARGET=target/x86_64-unknown-linux-musl/release/osc-cost
REGISTRY ?= outscale
IMAGE_NAME ?= osc-cost
TAG ?= DEV
IMG ?= $(REGISTRY)/$(IMAGE_NAME):$(TAG)
all: help
.PHONY: help
help:
@echo "help:"
@echo "- make build : build stand-alone binary of osc-cost"
@echo "- make test : run all tests"
build: $(TARGET)
target/x86_64-unknown-linux-musl/release/osc-cost: src/*.rs
cargo build --target x86_64-unknown-linux-musl --release
.PHONY: test
test: reuse-test cargo-test format-test integration-test
@echo all tests OK
.PHONY: cargo-test
cargo test
.PHONY: format-test
format-test:
cargo fmt --check
cargo clippy
.PHONY: integration-test
integration-test: $(TARGET)
./int-tests/run.sh
.PHONY: reuse-test
reuse-test:
docker run --rm --volume $(PWD):/data fsfe/reuse:0.11.1 lint
.PHONY: docker-build
docker-build: # Build docker image with the manager
DOCKER_BUILDKIT=1 docker buildx build -f helm/Dockerfile --load -t ${IMG} .
.PHONY: docker-push
docker-push: ## Push docker image with the manager.
docker push ${IMG}
.PHONY: helm-docs
helm-docs:
docker run --rm --volume "$$(pwd):/helm-docs" -u "$$(id -u)" jnorwood/helm-docs:v1.11.0