diff --git a/Makefile b/Makefile index c1ee695..9ab98fc 100644 --- a/Makefile +++ b/Makefile @@ -43,12 +43,15 @@ build-windows-arm: build-windows-arm64: GOOS=windows GOARCH=arm64 $(GO) build $(GO_FLAGS) -o bin/windows-arm64/g.exe +package: + sh ./package.sh test: $(GO) test -v ./... clean: $(GO) clean -x - rm -r bin + rm -f sha256sum.txt + rm -rf bin -.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 +.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 diff --git a/install.sh b/install.sh index 11703f8..6202670 100755 --- a/install.sh +++ b/install.sh @@ -27,7 +27,7 @@ function get_os() { } main() { - local release="1.2.1" + local release="1.3.0" local os=$(get_os) local arch=$(get_arch) local dest_file="${HOME}/g${release}.${os}-${arch}.tar.gz" diff --git a/package.sh b/package.sh index f51127a..d7ea192 100755 --- a/package.sh +++ b/package.sh @@ -36,8 +36,10 @@ function package() { printf "[2/2] Package\n" if [ ${os} == "windows" ]; then zip g${release}.${os}-${arch}.zip ./g.exe + shasum -a 256 g${release}.${os}-${arch}.zip >> sha256sum.txt else tar -czv -f g${release}.${os}-${arch}.tar.gz ./g + shasum -a 256 g${release}.${os}-${arch}.tar.gz >> sha256sum.txt fi } @@ -46,11 +48,12 @@ main() { export GO111MODULE="on" export GOPROXY="https://goproxy.cn,direct" - local release="1.2.1" + local release="1.3.0" for item in "darwin_amd64" "darwin_arm64" "linux_386" "linux_amd64" "linux_arm" "linux_arm64" "windows_386" "windows_amd64" "windows_arm" "windows_arm64"; do package ${release} ${item} done + go clean }