Makefile 928 Bytes
Newer Older
qiuqunfeng's avatar
qiuqunfeng committed
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
VERSION = 0.1.0

## 判断操作系统及内核架构
UNAME_S := $(shell uname -s)
UNAME_M := $(shell uname -m)

#ifeq ($(UNAME_S),Linux)
#	LDFLAGS = -extldflags "-static"
#endif

## 指定镜像仓库地址: "地址:端口/项目"
REPOPREFIX?=localhost:32000

## 指定镜像tag
IMAGE_TAG?=v0.0.1

## 指定国内源
MIRROR_SOURCE?=mirrors.aliyun.com

## holmes-packages的镜像tag
FETCHTAG?=latest

## base image的tag
BASE_IMAGE_TAG?=latest

## license版本: "sit"/"release"
LICENSE_SECRET?=sit

## 指定bin目录
BIN_DIR = $(shell pwd)/bin/

.PHONY: help
help:
	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'

.PHONY: cluster-manager
ai-gateway:
	@echo "build ai-gateway"
	go build -v \
		-tags=jsoniter -o dist/ai-gateway gitlab.com/tensorsecurity-rd/ai-gateway/cmd
	#upx --lzma --best dist/ai-gateway
	docker build -t $(REPOPREFIX)/ai-gateway:$(IMAGE_TAG) -f ./build/Dockerfile .