-
Notifications
You must be signed in to change notification settings - Fork 42
/
Makefile
28 lines (22 loc) · 887 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
27
export VERSION=0.1.31
.PHONY : install
install:
go build -i -v -mod=vendor -o out/ucloud main.go
cp out/ucloud /usr/local/bin
.PHONY : build_mac
build_mac:
GOOS=darwin GOARCH=amd64 go build -mod=vendor -o out/ucloud main.go
tar zcvf out/ucloud-cli-macosx-${VERSION}-amd64.tgz -C out ucloud
shasum -a 256 out/ucloud-cli-macosx-${VERSION}-amd64.tgz
.PHONY : build_linux
build_linux:
GOOS=linux GOARCH=amd64 go build -mod=vendor -o out/ucloud main.go
tar zcvf out/ucloud-cli-linux-${VERSION}-amd64.tgz -C out ucloud
shasum -a 256 out/ucloud-cli-linux-${VERSION}-amd64.tgz
.PHONY : build_windows
build_windows:
GOOS=windows GOARCH=amd64 go build -mod=vendor -o out/ucloud.exe main.go
zip -r out/ucloud-cli-windows-${VERSION}-amd64.zip out/ucloud.exe
shasum -a 256 out/ucloud-cli-windows-${VERSION}-amd64.zip
.PHONY : build_all
build_all: build_mac build_linux build_windows