-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
71 lines (56 loc) · 1.71 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
67
68
69
70
71
# Makefile
checkmark=\xE2\x9C\x94 # Unicode character representation
warning=\xE2\x9A\xA0 # Unicode character representation
define warn
@tput bold
@tput setaf 3
@printf "${warning}${1}\n"
@tput sgr0
endef
define log
@tput bold
@tput setaf 6
@printf "${checkmark}${1}\n"
@tput sgr0
endef
.DEFAULT_GOAL := help
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
OS := $(shell uname -s)
###############################################################################
# Default
###############################################################################
.PHONY: help
help:
@echo "\n|> Directory: ${ROOT_DIR}"
@echo "|> OS: ${OS}"
@echo "|> Available targets:\n"
@make -qpRr | egrep -e '^[a-z].*:$$' | sed -e 's~:~~g' | sort
.PHONY: all
all: clean pre-commit
@$(call log, all is done!)
.PHONY: test
test:
@$(call warn, dummy, nothing defined)
.PHONY: clean
clean:
@$(call warn, dummy, nothing defined)
###############################################################################
# Pre commit
###############################################################################
pre-commit: pre-commit-setup pre-commit-update
pre-commit-setup:
@$(call warn, install pre-commit dependencies)
pre-commit install
@$(call log, install pre-commit dependencies)
pre-commit-update:
@$(call warn, update pre-commit dependencies)
pre-commit autoupdate
@$(call log, update pre-commit dependencies)
###############################################################################
# Commitizen
###############################################################################
bump:
@$(call warn, bump version of commitizen)
cz bump
@$(call log, Dont forget to push the tags)
@$(call log, git push --tags)