@@ -6,31 +6,37 @@ install:
66 go build -i -v -mod=vendor -o out/ucloud main.go
77 cp out/ucloud /usr/local/bin
88
9- .PHONY : build_mac
10- build_mac :
11- GOOS=darwin GOARCH=amd64 go build -mod=vendor -o out/ucloud main.go
12- tar zcvf out/ucloud-cli-macosx-${VERSION} -amd64.tgz -C out ucloud
13- shasum -a 256 out/ucloud-cli-macosx-${VERSION} -amd64.tgz
14-
15- build_mac_arm :
16- GOOS=darwin GOARCH=arm64 go build -mod=vendor -o out/ucloud main.go
17- tar zcvf out/ucloud-cli-macosx-${VERSION} -arm64.tgz -C out ucloud
18- shasum -a 256 out/ucloud-cli-macosx-${VERSION} -arm64.tgz
19-
20- .PHONY : build_linux
21- build_linux :
22- GOOS=linux GOARCH=amd64 go build -mod=vendor -o out/ucloud main.go
23- tar zcvf out/ucloud-cli-linux-${VERSION} -amd64.tgz -C out ucloud
24- shasum -a 256 out/ucloud-cli-linux-${VERSION} -amd64.tgz
25-
26- .PHONY : build_windows
27- build_windows :
28- GOOS=windows GOARCH=amd64 go build -mod=vendor -o out/ucloud.exe main.go
29- zip -r out/ucloud-cli-windows-${VERSION} -amd64.zip out/ucloud.exe
30- shasum -a 256 out/ucloud-cli-windows-${VERSION} -amd64.zip
31-
32- .PHONY : build_all
33- build_all : build_mac build_linux build_windows
9+ .PHONY : build-darwin-amd64
10+ build-darwin-amd64 :
11+ GOOS=darwin GOARCH=amd64 go build -mod=vendor -o out/darwin_amd64/ucloud main.go
12+ @cp LICENSE out/darwin_amd64
13+
14+ .PHONY : build-darwin-arm64
15+ build-darwin-arm64 :
16+ GOOS=darwin GOARCH=arm64 go build -mod=vendor -o out/darwin_arm64/ucloud main.go
17+ @cp LICENSE out/darwin_arm64
18+
19+ .PHONY : build-linux-amd64
20+ build-linux-amd64 :
21+ GOOS=linux GOARCH=amd64 go build -mod=vendor -o out/linux_amd64/ucloud main.go
22+ @cp LICENSE out/linux_amd64
23+
24+ .PHONY : build-linux-arm64
25+ build-linux-arm64 :
26+ GOOS=linux GOARCH=amd64 go build -mod=vendor -o out/linux_arm64/ucloud main.go
27+ @cp LICENSE out/linux_arm64
28+
29+ .PHONY : build-windows-amd64
30+ build-windows-amd64 :
31+ GOOS=windows GOARCH=amd64 go build -mod=vendor -o out/windows_amd64/ucloud.exe main.go
32+ @cp LICENSE out/windows_amd64
33+
34+ .PHONY : build-all
35+ build-all : build-darwin-amd64 build-darwin-arm64 build-linux-arm64 build-linux-amd64 build-windows-amd64
36+
37+ .PHONY : release
38+ release :
39+ @gitflow run release -f .gitflow.yaml
3440
3541.PHONY : fmt
3642fmt :
0 commit comments