Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Use sh syntax […] instead bash [[ … ]] for if block
天舟cf931ada4223
diff --git a/build.sh b/build.shindex c2b0919e8d..14952c9efe 100755--- a/build.sh+++ b/build.sh@@ -19,13 +19,13 @@ fiOUTPUT_BINARY=$OUTPUT_DIR/bytebase-if [[ `dirname "${BASH_SOURCE[0]}"` != "." ]]+if [ `dirname "${BASH_SOURCE[0]}"` != "." ]thenecho "${RED}Precheck failed.${NC} Build script must run from Bytebase root directory ${SCRIPT_DIR}"; exit 1;fiGO_VERSION=`go version | { read _ _ v _; echo ${v#go}; }`-if [[ "${GO_VERSION}" < "1.16" ]];+if [ "${GO_VERSION}" < "1.16" ];thenecho "${RED}Precheck failed.${NC} Require go version >= 1.16. Current version ${GO_VERSION}."; exit 1;fidiff --git a/build_bb.sh b/build_bb.shindex e09ed5ab43..474db759d9 100755--- a/build_bb.sh+++ b/build_bb.sh@@ -19,7 +19,7 @@ fiOUTPUT_BINARY=$OUTPUT_DIR/bb-if [[ `dirname "${BASH_SOURCE[0]}"` != "." ]]+if [ `dirname "${BASH_SOURCE[0]}"` != "." ]thenecho "${RED}Precheck failed.${NC} Build script must run from Bytebase root directory ${SCRIPT_DIR}"; exit 1;fi