From b38176609e4d5163aac8a50a6ca425bcdf5411a1 Mon Sep 17 00:00:00 2001 From: He Wang Date: Wed, 20 Nov 2024 17:36:58 +0800 Subject: [PATCH] fix build script exit code and fix typo in README --- README.md | 2 +- build.sh | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e21344dcd..9ec44d318 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ Please see [Coding gh-ost](doc/coding-ghost.md) for a guide to getting started d `gh-ost` is a Go project; it is built with Go `1.15` and above. To build on your own, use either: - [script/build](https://github.com/github/gh-ost/blob/master/script/build) - this is the same build script used by CI hence the authoritative; artifact is `./bin/gh-ost` binary. -- [build.sh](https://github.com/github/gh-ost/blob/master/build.sh) for building `tar.gz` artifacts in `/tmp/gh-ost` +- [build.sh](https://github.com/github/gh-ost/blob/master/build.sh) for building `tar.gz` artifacts in `/tmp/gh-ost-release` Generally speaking, `master` branch is stable, but only [releases](https://github.com/github/gh-ost/releases) are to be used in production. diff --git a/build.sh b/build.sh index 64d5b1584..1a5af7036 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,4 @@ #!/bin/bash -# -# RELEASE_VERSION= buildpath= @@ -72,11 +70,14 @@ main() { build macOS osx darwin amd64 build macOS osx darwin arm64 + bin_files=$(find $buildpath/gh-ost* -type f -maxdepth 1) echo "Binaries found in:" - find $buildpath/gh-ost* -type f -maxdepth 1 + echo "$bin_files" echo "Checksums:" - (cd $buildpath && shasum -a256 gh-ost* 2>/dev/null) + (shasum -a256 $bin_files 2>/dev/null) + + echo "Build Success!" } main "$@"