-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (33 loc) · 819 Bytes
/
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
# By Andrew Paradi | Source at https://github.com/andrewparadi/get-started-with-jekyll
DOCKER_COMPOSE=$(shell which docker-compose)
DOCKER_COMPOSE_TARGETS=-f docker-compose.yml
define DOCKER_NICE
trap '$(DOCKER_COMPOSE) $(DOCKER_COMPOSE_TARGETS) down' SIGINT SIGTERM && \
$(DOCKER_COMPOSE) $(DOCKER_COMPOSE_TARGETS)
endef
export DOCKER_NICE
default: run
init:
build: init
bash -c "$$DOCKER_NICE build"
rebuild: init
bash -c "$$DOCKER_NICE build --no-cache"
compile: init
bash -c "$$DOCKER_NICE run app webpack"
add:
bash -c "git add ."
commit: add
@read -p "Enter commit message: " message; \
git commit -am "$$message"
save: add commit
git push
run: init
bash -c "$$DOCKER_NICE up"
.PHONY: init
.PHONY: build
.PHONY: rebuild
.PHONY: compile
.PHONY: add
.PHONY: commit
.PHONY: save
.PHONY: run