forked from bullteam/zeus-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (43 loc) · 1.57 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
SHELL := /bin/bash
BASE_PATH := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
TITLE := $(shell basename $(BASE_PATH))
SHORT_REV := $(shell git rev-parse HEAD | cut -c1-8)
BUILD_TIME := $(shell date +%Y-%m-%d--%T)
APP_PKG := $(shell $(BASE_PATH)/scripts/apppkg.sh)
UI := $(BASE_PATH)/pkg/webui
TAG := $(shell $(BASE_PATH)/scripts/tag.sh)
export BIN_OUT := $(BASE_PATH)/bin
package: ui build docker
print:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>making print<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@echo SHELL:$(SHELL)
@echo BASE_PATH:$(BASE_PATH)
@echo TITLE:$(TITLE)
@echo SHORT_REV:$(SHORT_REV)
@echo APP_PKG:$(APP_PKG)
@echo BIN_OUT:$(BIN_OUT)
@echo USER:$(USER)
@echo HUB:$(HUB)
@echo UI:$(UI)
@echo TAG:$(TAG)
@echo -e "\n"
build:
@echo -e ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>compile server<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
$(BASE_PATH)/scripts/build.sh
@echo -e "\n"
pack:
@echo -e ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>pack server and ui<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
$(BASE_PATH)/scripts/pack.sh
@echo -e "\n"
run:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>run directly<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
$(shell $(BASE_PATH)/scripts/run.sh)
@echo -e "\n"
ui:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>compile ui<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
$(BASE_PATH)/scripts/ui.sh
@echo -e "\n"
docker:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>docker build & push<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
$(BASE_PATH)/scripts/docker.sh ${tag}
@echo -e "\n"