-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (41 loc) · 1.77 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
APP_NAME:=clickvisual
SHELL:=/bin/bash
ROOT:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
APP_PATH=$(ROOT)/api
SCRIPT_PATH:=$(APP_PATH)/../scripts
COMPILE_OUT:=$(APP_PATH)/../bin/$(APP_NAME)
HUB_USER:=clickvisual
build: build.ui build.dist build.api
docs:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>ego gen api $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@egogen --config egogen.yaml
@echo -e "success \n"
build.api:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>making $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@chmod +x $(SCRIPT_PATH)/build/*.sh
@cd $(APP_PATH) && $(SCRIPT_PATH)/build/gobuild.sh $(APP_NAME) $(COMPILE_OUT)
@echo -e "\n"
build.dist:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>making $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@rm -rf $(APP_PATH)/../api/internal/ui/dist
@mv $(APP_PATH)/../ui/dist $(APP_PATH)/../api/internal/ui/dist
@echo -e "\n"
build.ui:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>making $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@cd $(APP_PATH)/../ui && yarn install --frozen-lockfile && yarn run build
@echo -e "\n"
docker:docker.build docker.push
docker.build:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>making $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@docker build -t $(HUB_USER)/clickvisual:latest .
@echo -e "\n"
docker.push:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>making $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@docker push $(HUB_USER)/clickvisual:latest
@echo -e "\n"
docker.clean:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>making $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@rm -rf $(ROOT)/data/all-in-one/clickhouse/database
@rm -rf $(ROOT)/data/all-in-one/kafka/data
@rm -rf $(ROOT)/data/all-in-one/zookeeper/data
@rm -rf $(ROOT)/data/all-in-one/zookeeper/datalog