-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (27 loc) · 1.37 KB
/
Copy pathMakefile
File metadata and controls
30 lines (27 loc) · 1.37 KB
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
version = 1.0.0
build:
go build -o /usr/local/bin/target .
multi_build:
@echo ""
@echo "Compile cli"
# Clear the output
rm -rf ./bin
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o ./bin/linux_arm64/target_v$(version) main.go
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o ./bin/linux_amd64/target_v$(version) main.go
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -o ./bin/darwin_arm64/target_v$(version) main.go
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -o ./bin/darwin_amd64/target_v$(version) main.go
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o ./bin/windows_amd64/target_v$(version).exe main.go
GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -o ./bin/windows_386/target_v$(version).exe main.go
zip:
pwd
zip -j ./bin/target_v$(version)_linux_arm64.zip ./bin/linux_arm64/target_v$(version)
zip -j ./bin/target_v$(version)_linux_amd64.zip ./bin/linux_amd64/target_v$(version)
zip -j ./bin/target_v$(version)_darwin_arm64.zip ./bin/linux_arm64/target_v$(version)
zip -j ./bin/target_v$(version)_darwin_amd64.zip ./bin/linux_arm64/target_v$(version)
zip -j ./bin/target_windows_amd64.zip ./bin/windows_amd64/target_v$(version).exe
zip -j ./bin/target_v$(version)_windows_386.zip ./bin/windows_386/target_v$(version).exe
ls -lha ./bin
shasum:
cd bin/; shasum -a 256 *.zip > target_v$(version)_SHA256SUMS
gpg:
gpg --detach-sign ./bin/target_v$(version)_SHA256SUMS