This repository has been archived by the owner on Nov 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
64 lines (50 loc) · 3.15 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
# —— Inspired by ———————————————————————————————————————————————————————————————
# https://www.strangebuzz.com/en/snippets/the-perfect-makefile-for-symfony
# Setup ————————————————————————————————————————————————————————————————————————
# Parameters
SHELL = bash
ME = $(shell whoami)
# Executables: local only
DOCKER = docker
# Misc
.DEFAULT_GOAL = build
.PHONY = # Not needed here, but you can put your all your targets to be sure
# there is no name conflict between your files and your targets.
## —— 🐝 The Strangebuzz Docker Makefile 🐝 ———————————————————————————————————
help: ## Outputs this help screen
@grep -E '(^[a-zA-Z0-9_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
## —— All 🎵 ———————————————————————————————————————————————————————————————
.PHONY: all
all: clean build
## —— Clean 🧹 ———————————————————————————————————————————————————————————————
.PHONY: clean
clean:
@echo "=> Cleaning image..."
## —— Ansible 🐝 ————————————————————————————————————————————————————————————————
.PHONY: build-ansible
build-ansible: ## Build workstation with ansible
@echo "=> Building ansible..."
./setup.sh
## —— Build 🚀 —————————————————————————————————————————————————————————————————
.PHONY: build
build: build-ansible
## —— Up ✅ —————————————————————————————————————————————————————————————————
.PHONY: up
up:
@echo "up"
.PHONY: down
down:
@echo "down"
.PHONY: run
run: down up
## —— Formating 🧪🔗 ———————————————————————————————————————————————————————————————
.PHONY: fmt
fmt: ## Run formating
@echo "=> Executing formating..."
shfmt -i 2 -ci -w *.sh || true
ansible-lint --write ./
## —— Tests Ansible 🧪🔗 —————————————————————————————————————————————————————————————————
.PHONY: test
test: ## Run all tests
@echo "=> Testing ansible..."
ansible-lint ./