-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (54 loc) · 1.62 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
SHELL := /bin/bash
export
# CONFIGURAÇÃO DAS VARIÁVEIS DO TERMINAL.
# APLICAÇÃO
APLICATION_NAME="social tree"
APLICATION_SERVICE=node
# CORES
BLACK=`tput setaf 0`
RED=`tput setaf 1`
GREEN=`tput setaf 2`
YELLOW=`tput setaf 3`
BLUE=`tput setaf 4`
WHITE=`tput setaf 7`
RESET=`tput sgr0`
export HOST_UID:=$(shell id --user)
export HOST_USER:=$(shell id --user --name)
export HOST_GID:=$(shell id --group)
export HOST_GROUP:=$(shell id --group --name)
.PHONY: help build up deploy console refresh scssToCss
help:
@echo ${GREEN} 'Lista de comandos disponíveis no "make"'
@echo ''
@echo ${YELLOW} 'Opções: make [TARGET] [OPTIONS]'
@echo ''
@echo ${BLUE} 'help' ${RESET} 'Mostra esta mensagem'
@echo ''
@echo ${BLUE} 'build' ${RESET} 'Compila os assets e levanta o servidor Node $(APLICATION_NAME)'
@echo ''
@echo ${BLUE} 'up' ${RESET} 'Levanta o servidor node $(APLICATION_NAME)'
@echo ''
@echo ${BLUE} 'deploy' ${RESET} 'Compila os assets do projeto $(APLICATION_NAME)'
@echo ''
@echo ${BLUE} 'refresh' ${RESET} 'Atualiza os assets e limpa o cache do projeto $(APLICATION_NAME)'
@echo ''
@echo ${BLUE} 'scssToCss' ${RESET} 'Converter arquivos scss para css do projeto $(APLICATION_NAME)'
@echo ''
@echo ''
build:
@echo 'Instalando o projeto $(APLICATION_NAME)'
$(MAKE) deploy
$(MAKE) up
up:
@echo 'Buildando o projeto $(APLICATION_NAME)'.
@node server.js
deploy:
@echo 'Deployando o projeto $(APLICATION_NAME)'.
@npm install -y
@echo ''
$(MAKE) scssToCss
refresh:
@npm install -y
scssToCss:
@echo "${RESET}Executando a geração dos css ${GREEN} 'scssToCss' do projeto ${APLICATION_NAME}${RESET}."
@npm run scssToCss;