drone-pre-commit/Makefile
Ian Fijolek 6481b89b0c Add tests
These aren't run on drone yet as there is no pre-commit plugin!
2020-09-08 10:14:06 -07:00

26 lines
418 B
Makefile

DOCKER_TAG = drone-pre-commit-$(USER)
.PHONY: clean
.PHONY: default
default: test
.PHONY: test
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) .
.PHONY: install-hooks
install-hooks:
pre-commit install --install-hooks
.PHONY: check
check:
pre-commit run --all-files
.PHONY: all
all: test check