-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
26 lines (21 loc) · 913 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
GITHUB_REPOSITORY ?= camptocamp/c2cciutils
export DOCKER_BUILDKIT = 1
VERSION = $(strip $(shell poetry version --short))
.PHONY: help
help: ## Display this help message
@echo "Usage: make <target>"
@echo
@echo "Available targets:"
@grep --extended-regexp --no-filename '^[a-zA-Z_-]+:.*## ' $(MAKEFILE_LIST) | sort | \
awk 'BEGIN {FS = ":.*?## "}; {printf " %-20s%s\n", $$1, $$2}'
.PHONY: build
build: ## Build the Docker images
docker build --build-arg=VERSION=$(VERSION) --tag=$(GITHUB_REPOSITORY) .
.PHONY: build-checker
build-checker: ## Build the checker Docker images
docker build --target=checker --tag=$(GITHUB_REPOSITORY)-checker .
.PHONY: checks
checks: prospector ## Do the checks
.PHONY: prospector
prospector: build-checker ## Run Prospector
docker run --rm --volume=${PWD}:/app $(GITHUB_REPOSITORY)-checker prospector --ignore-paths=example-project/ --output=pylint --die-on-tool-error