-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (39 loc) · 1.02 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
.PHONY: compile update clean deep-clean
all: compile
PROJECT_NAME := lldp
include docker/Makefile
ifneq (,$(wildcard ./rebar3))
REBAR_FILE = ./rebar3
else
REBAR_FILE = rebar3
endif
REBAR := $(EXEC_ARGS) $(REBAR_FILE)
compile:
@$(EXEC) "$(REBAR) as test compile"
local:
@mkdir -p _build
@touch _build/.localbuild
release: compile
@$(EXEC) "$(REBAR) release"
update:
@$(EXEC) "$(REBAR) update"
@$(EXEC) "$(REBAR) upgrade"
@$(EXEC) "$(REBAR) compile"
clean:
@$(EXEC) "$(REBAR) clean"
image: release
docker build -t ${PROJECT_NAME} .
dind:
kubectl delete --ignore-not-found -f k8s/${PROJECT_NAME}.yml
docker build -t ${PROJECT_NAME} .
docker tag ${PROJECT_NAME}:latest vdasari-mac.local:5000/${PROJECT_NAME}:latest
docker push vdasari-mac.local:5000/${PROJECT_NAME}:latest
kubectl create -f k8s/${PROJECT_NAME}.yml
deep-clean:
@rm -rf _build rebar.lock
SHELL_ARGS := ERL_FLAGS=\" -args_file config/vm.args -config config/sys.config\" rebar3 as test shell
run:
@$(EXEC) "$(EXEC_ARGS) $(SHELL_ARGS)"
%:
@:
.SILENT: