File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,15 @@ build-windows-arm:
4343build-windows-arm64 :
4444 GOOS=windows GOARCH=arm64 $(GO ) build $(GO_FLAGS ) -o bin/windows-arm64/g.exe
4545
46+ package :
47+ sh ./package.sh
4648
4749test :
4850 $(GO ) test -v ./...
4951
5052clean :
5153 $(GO ) clean -x
52- rm -r bin
54+ rm -f sha256sum.txt
55+ rm -rf bin
5356
54- .PHONY : all build install test clean build-linux build-darwin build-windows build-linux-386 build-linux-amd64 build-linux-arm build-linux-arm64 build-darwin-amd64 build-darwin-arm64 build-windows-386 build-windows-amd64 build-windows-arm build-windows-arm64
57+ .PHONY : all build install test package clean build-linux build-darwin build-windows build-linux-386 build-linux-amd64 build-linux-arm build-linux-arm64 build-darwin-amd64 build-darwin-arm64 build-windows-386 build-windows-amd64 build-windows-arm build-windows-arm64
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ function get_os() {
2727}
2828
2929main () {
30- local release=" 1.2.1 "
30+ local release=" 1.3.0 "
3131 local os=$( get_os)
3232 local arch=$( get_arch)
3333 local dest_file=" ${HOME} /g${release} .${os} -${arch} .tar.gz"
Original file line number Diff line number Diff line change @@ -36,8 +36,10 @@ function package() {
3636 printf " [2/2] Package\n"
3737 if [ ${os} == " windows" ]; then
3838 zip g${release} .${os} -${arch} .zip ./g.exe
39+ shasum -a 256 g${release} .${os} -${arch} .zip >> sha256sum.txt
3940 else
4041 tar -czv -f g${release} .${os} -${arch} .tar.gz ./g
42+ shasum -a 256 g${release} .${os} -${arch} .tar.gz >> sha256sum.txt
4143 fi
4244}
4345
@@ -46,11 +48,12 @@ main() {
4648 export GO111MODULE=" on"
4749 export GOPROXY=" https://goproxy.cn,direct"
4850
49- local release=" 1.2.1 "
51+ local release=" 1.3.0 "
5052
5153 for item in " darwin_amd64" " darwin_arm64" " linux_386" " linux_amd64" " linux_arm" " linux_arm64" " windows_386" " windows_amd64" " windows_arm" " windows_arm64" ; do
5254 package ${release} ${item}
5355 done
56+
5457 go clean
5558}
5659
You can’t perform that action at this time.
0 commit comments