-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (34 loc) · 1.1 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
# Download make para windows
# https://iweb.dl.sourceforge.net/project/gnuwin32/make/3.81/make-3.81.exe
# Setar como variável de ambiente
# Executar comando: make build | login | tag | push
TAG=$(shell git log -1 --format=%h)
URL="http://speedphp.localhost/config"
# PEGAR ARGUMENTOS QUANDO PASSAR GIT
ifeq (push,$(firstword $(MAKECMDGOALS)))
# use the rest as arguments for "run"
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(RUN_ARGS):;@:)
endif
push:
curl ${URL}/build
git add .
git commit -m "$(RUN_ARGS)"
git pull origin main
git push origin main
createmodel:
@read -p "Digite o nome da tabela do banco (Ex: PESSOA): " servico; \
curl ${URL}/createmodel/$$servico
echo "Executado"
createpage:
@read -p "Digite o nome do módulo e serviço (Ex: teste/beta): " servico; \
curl ${URL}/createpage/$$servico
echo "Executado"
build:
curl ${URL}/build
echo "Executado"
backup:
@echo "Iniciando o processo de backup e importação..."
@bash docker/import-database.sh
echo "Executado"