2020-09-08 17:14:06 +00:00
|
|
|
DOCKER_TAG = drone-pre-commit-$(USER)
|
|
|
|
|
2020-09-08 17:00:20 +00:00
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
.PHONY: default
|
|
|
|
default: test
|
|
|
|
|
|
|
|
.PHONY: test
|
2020-09-08 17:14:06 +00:00
|
|
|
test: build
|
|
|
|
docker run --rm -v $(shell pwd):/src:ro --workdir /src $(DOCKER_TAG) ./tests/steps.sh
|
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build: ./Dockerfile
|
|
|
|
docker build -t $(DOCKER_TAG) .
|
2020-09-08 17:00:20 +00:00
|
|
|
|
|
|
|
.PHONY: install-hooks
|
|
|
|
install-hooks:
|
|
|
|
pre-commit install --install-hooks
|
|
|
|
|
|
|
|
.PHONY: check
|
|
|
|
check:
|
|
|
|
pre-commit run --all-files
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: test check
|