2020-01-27 22:17:55 +00:00
|
|
|
.PHONY: all test clean
|
|
|
|
|
2020-09-19 20:07:34 +00:00
|
|
|
all: check test
|
2020-01-27 22:17:55 +00:00
|
|
|
|
|
|
|
test: test-negative test-positive
|
|
|
|
|
|
|
|
.PHONY: test-positive
|
|
|
|
test-positive:
|
|
|
|
@echo "Check valid compose file."
|
|
|
|
./compose-check.sh tests/docker-compose.yml || { echo 'fail'; exit 1; }
|
|
|
|
|
|
|
|
.PHONY: test-negative
|
|
|
|
test-negative:
|
|
|
|
@echo "Check bad file. Should error."
|
|
|
|
./compose-check.sh tests/docker-compose.bad.yml && { echo 'fail'; exit 1; } || echo 'ok'
|
|
|
|
@echo "Check multiple files. Should error."
|
|
|
|
./compose-check.sh tests/docker-compose* && { echo 'fail'; exit 1; } || echo 'ok'
|
2020-09-19 20:07:34 +00:00
|
|
|
|
|
|
|
# Installs pre-commit hooks
|
|
|
|
.PHONY: install-hooks
|
|
|
|
install-hooks:
|
|
|
|
pre-commit install --install-hooks
|
|
|
|
|
|
|
|
# Checks files for encryption
|
|
|
|
.PHONY: check
|
|
|
|
check:
|
|
|
|
pre-commit run --all-files
|