-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (37 loc) · 1 KB
/
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
36
37
38
39
40
41
42
43
GALAXY = @ansible-galaxy
NAMESPACE = $(shell yq -r .namespace galaxy.yml)
ROLENAME = $(shell yq -r .name galaxy.yml)
ROLEVERSION = $(shell yq -r .version galaxy.yml)
DIST = ./dist
.PHONY: build
build:
$(GALAXY) collection build --output-path "$(DIST)"
.PHONY: clean
clean:
-rm --recursive "$(DIST)"
.PHONY: install
install:
ifeq (, $(shell which yq))
$(error "no yq. try doing pip3 install yq")
else
$(GALAXY) collection install "$(DIST)/$(NAMESPACE)-$(ROLENAME)-$(ROLEVERSION).tar.gz"
endif
.PHONY: publish
publish:
ifeq (, $(shell which yq))
$(error "no yq. try running pip3 install yq")
else
$(GALAXY) collection publish "$(DIST)/$(NAMESPACE)-$(COLLECTION)-$(VERSION).tar.gz" --token "$(GALAXY_API_TOKEN)"
endif
.PHONY: lint
lint:
#$(MAKE) -C roles/borgbackup lint
$(MAKE) -C roles/molly_guard lint
$(MAKE) -C roles/nftables lint
$(MAKE) -C roles/sshd lint
.PHONY: test
test:
#$(MAKE) -C roles/borgbackup test
$(MAKE) -C roles/molly_guard test
$(MAKE) -C roles/nftables test
$(MAKE) -C roles/sshd test