forked from WeBankPartners/open-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (20 loc) · 882 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
export GOPATH=$(PWD)
current_dir=$(shell pwd)
version=$(shell bash ./build/version.sh)
project_name=open-monitor
APP_HOME=src/github.com/WeBankPartners/open-monitor
ifndef RUN_MODE
RUN_MODE=dev
endif
clean-server:
rm -rf monitor-server/monitor-server
clean-ui:
rm -rf monitor-ui/dist
build-server: clean-server
chmod +x ./build/*.sh
docker run --rm -v $(current_dir):/go/src/github.com/WeBankPartners/$(project_name) --name build_$(project_name)_server golang:1.12.5 /bin/bash /go/src/github.com/WeBankPartners/$(project_name)/build/build-server.sh
build-ui: clean-ui
chmod +x ./build/*.sh
docker run --rm -v $(current_dir):/go/src/github.com/WeBankPartners/$(project_name) --name build_$(project_name)_ui node:12.10.0 /bin/bash /go/src/github.com/WeBankPartners/$(project_name)/build/build-ui.sh
image: build-server build-ui
docker build -t monitor:$(version) .