-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (24 loc) · 872 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
oci_registry?=tasselsd
version?=latest
git_hash:=$(shell git rev-parse HEAD)
all: agent plugin agentctl
plugin:
docker build --build-arg VERSION=${version}-${git_hash} . -t ${oci_registry}/umeq-csi:${version};\
docker push ${oci_registry}/umeq-csi:${version}
agent:
cd cmd/agent;\
go build -ldflags "-s -w";\
scp agent [email protected]:/opt/umeq-csi/
agentctl:
cd cmd/agentctl;\
go build -ldflags "-s -w";\
scp agentctl [email protected]:/usr/bin/
lint:
cd cmd/plugin;go build -ldflags "-s -w";\
cd ../agentctl;go build -ldflags "-s -w";\
cd ../agent;go build -ldflags "-s -w"
dist:
docker run --rm -e GOPROXY=https://goproxy.cn -v ${shell echo $GOPATH}:/go \
-v ${shell pwd}:/app -w /app golang:1.19.2-buster sh -c \
"env;cd cmd/agent;go build -ldflags \"-s -w\" -o agent-linux_amd64;cd ../agentctl;\
go build -ldflags \"-s -w\" -o agentctl-linux_amd64"