forked from vitabaks/autobase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (57 loc) · 1.97 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
.PHONY: all test SHELL
# Makefile global config
.DEFAULT_GOAL:=help
.EXPORT_ALL_VARIABLES:
.ONESHELL:
.SILENT:
MAKEFLAGS += "-j$(NUM_CORES) -l$(NUM_CORES)"
MAKEFLAGS += --silent
SHELL:=/bin/bash
# Makefile colors config
bold=$(shell tput bold)
normal=$(shell tput sgr0)
errorTitle=$(shell tput setab 1 && tput bold && echo '\n')
recommendation=$(shell tput setab 4)
underline=$(shell tput smul)
reset=$(shell tput -Txterm sgr0)
black=$(shell tput setaf 0)
red=$(shell tput setaf 1)
green=$(shell tput setaf 2)
yellow=$(shell tput setaf 3)
blue=$(shell tput setaf 4)
magenta=$(shell tput setaf 5)
cyan=$(shell tput setaf 6)
white=$(shell tput setaf 7)
define HEADER
How to use me:
make && make bootstrap
make ${cyan}<target>${reset}
endef
export HEADER
python_launcher := python3.10
-include .config/make/help.mak
-include .config/make/python.mak
-include .config/make/docker.mak
-include .config/make/molecule.mak
-include .config/make/linters.mak
## —— Bootstrap collection ———————————————————————————————————————————————————————————————————————
.PHONY: bootstrap
bootstrap: ## Bootstrap Ansible collection
$(MAKE) python-bootstrap
$(MAKE) python-bootstrap-dev
## —— Virtualenv ————————————————————————————————————————————————————————————————————————————————
.PHONY: reinitialization
reinitialization: ## Return to an initial state of Bootstrap Ansible collection
rm -rf .venv/
rm -rf vendor/
rm -f *.mak
$(MAKE) bootstrap
.PHONY: clean
clean: ## Clean collection
rm -rf .venv/
rm -rf .pytest_cache/
rm -rf scripts/.pytest_cache/
rm -rf scripts/tests/__pycache__/
rm -rf scripts/modules/__pycache__/
rm -rf scripts/modules/services/__pycache__/
rm -rf scripts/modules/utils/__pycache__/