forked from artis3n/ansible-role-tailscale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (29 loc) · 791 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
34
35
#!/usr/bin/env make
.PHONY: all
all: lint test
# Install Python 3.10 first
.PHONY: install
install:
if [ ! -d ~/.local/share/virtualenvs/ ]; then mkdir -p ~/.local/share/virtualenvs; fi;
if [ ! $$(find ~/.local/share/virtualenvs/ -name "artis3n.tailscale*") ]; then pipenv install --dev; fi;
if [ ! -f .git/hooks/pre-commit ]; then pipenv run pre-commit install; fi;
.PHONY: clean
clean:
pipenv --rm
.PHONY: update
update:
pipenv update --dev
pipenv run pre-commit autoupdate
# If local, make sure TAILSCALE_CI_KEY env var is set.
# This is automatically populated in a GitHub Codespace.
.PHONY: test
test:
ifndef TAILSCALE_CI_KEY
$(error TAILSCALE_CI_KEY is not set)
else
pipenv run molecule test --all
endif
.PHONY: lint
lint:
pipenv run yamllint .
pipenv run ansible-lint