-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
50 lines (40 loc) · 1.58 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
current-dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
SHELL = /bin/bash
ifneq (,$(findstring xterm,${TERM}))
BLACK := $(shell tput -Txterm setaf 0)
RED := $(shell tput -Txterm setaf 1)
GREEN := $(shell tput -Txterm setaf 2)
YELLOW := $(shell tput -Txterm setaf 3)
LIGHTPURPLE := $(shell tput -Txterm setaf 4)
PURPLE := $(shell tput -Txterm setaf 5)
BLUE := $(shell tput -Txterm setaf 6)
WHITE := $(shell tput -Txterm setaf 7)
RESET := $(shell tput -Txterm sgr0)
else
BLACK := ""
RED := ""
GREEN := ""
YELLOW := ""
LIGHTPURPLE := ""
PURPLE := ""
BLUE := ""
WHITE := ""
RESET := ""
endif
help:
@grep -E '^[a-zA-Z_0-9%-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "${GREEN}%-12s${RESET} %s\n", $$1, $$2}'
default: server
# bootstrap: ## is used solely for fulfilling dependencies of the project
# @cd $(current-dir)/site; npm install
setup: ## is used to set up a project in an initial state
@cd $(current-dir)/site; npm install
update: setup ## is used to update the project after a fresh pull
@echo "is used to update the project after a fresh pull"
server: setup ## is used to start the application
@cd $(current-dir)/site; npm run start
test: ## is used to run the test suite of the application
@echo "is used to run the test suite of the application"
clean: ## is used to reset the infrastructure o an inditial state
@git clean -xfd
ochp: ## is used to reset the infrastructure o an inditial state
@./scripts.d/ochp.sh