-
Notifications
You must be signed in to change notification settings - Fork 71
/
Makefile
33 lines (26 loc) · 899 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
27
28
29
30
31
32
33
WORKSPACE ?= ${HOME}/.cache
ENVIRONMENT := $(notdir $(realpath $(CURDIR)))
.PHONY: all
all: vendor .resource_types install-hooks
.PHONY: venv
venv: bin/venv-update Makefile
bin/venv-update \
venv= $@ -ppython3 \
install= pre-commit\>=1.0.0 importlib-metadata\<2.0.0 virtualenv==20.15.1
.PHONY: test
test: venv install-hooks
venv/bin/pre-commit run --all-files
.PHONY: install-hooks
install-hooks: venv
venv/bin/pre-commit install -f --install-hooks
vendor: Puppetfile
r10k puppetfile install --verbose --color
@echo 'You may also want to run `make .resource_types`'
.resource_types: vendor
puppet generate types --environment ${ENVIRONMENT} --force || (\
echo '\e[1;31mPlease run' && \
echo 'mkdir -p ~/.puppetlabs/etc/puppet/ && cp /etc/skel/.puppetlabs/etc/puppet/puppet.conf ~/.puppetlabs/etc/puppet/\e[0m' && \
false )
.PHONY: all_diffs
all_diffs:
./bin/octocatalog-diff