chore: introduce strict bash mode for scripts,.github

REF: #15514

Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
Wei Fu
2023-03-21 21:18:17 +08:00
parent 6d01ab641f
commit 1fcb782780
29 changed files with 137 additions and 69 deletions

View File

@ -1,19 +1,17 @@
#!/usr/bin/env bash
set -e
set -euo pipefail
source ./scripts/test_lib.sh
VER=$1
VER=${1:-}
REPOSITORY="${REPOSITORY:-git@github.com:etcd-io/etcd.git}"
if [ -z "$1" ]; then
if [ -z "$VER" ]; then
echo "Usage: ${0} VERSION" >> /dev/stderr
exit 255
fi
set -u
function setup_env {
local ver=${1}
local proj=${2}
@ -60,7 +58,7 @@ function main {
cd release
setup_env "${VER}" "${proj}"
tarcmd=tar
local tarcmd=tar
if [[ $(go env GOOS) == "darwin" ]]; then
echo "Please use linux machine for release builds."
exit 1