-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (27 loc) · 1.06 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
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
BASEPATH := $(shell pwd)
BUILDDIR=$(BASEPATH)/dist
GOGINDATA=go-bindata
GOARCH=amd64
KO_SERVER_NAME=ko-server
KO_CONFIG_DIR=etc/ko
KO_BIN_DIR=usr/local/bin
KO_DATA_DIR=usr/local/lib/ko
GOPROXY="https://goproxy.cn,direct"
build_server_linux:
GOOS=linux GOARCH=$(GOARCH) $(GOGINDATA) -o ./pkg/i18n/locales.go -pkg i18n ./locales/...
GOOS=linux GOARCH=$(GOARCH) $(GOBUILD) -o $(BUILDDIR)/$(KO_BIN_DIR)/$(KO_SERVER_NAME) main.go
mkdir -p $(BUILDDIR)/$(KO_CONFIG_DIR) && cp -r $(BASEPATH)/conf/app.yaml $(BUILDDIR)/$(KO_CONFIG_DIR)
mkdir -p $(BUILDDIR)/$(KO_DATA_DIR)
cp -r $(BASEPATH)/migration $(BUILDDIR)/$(KO_DATA_DIR)
docker_ui:
docker build -t kubeoperator/ui:master ./ui --no-cache
docker_server:
docker build -t kubeoperator/server:master --build-arg GOPROXY=$(GOPROXY) --build-arg GOARCH=$(GOARCH) --build-arg XPACK="no" .
docker_server_xpack:
docker build -t kubeoperator/server:master --build-arg GOPROXY=$(GOPROXY) --build-arg GOARCH=$(GOARCH) --build-arg XPACK="yes" .
clean:
rm -fr ./dist
go clean