chore: introduce strict bash mode for scripts,.github
REF: #15514 Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user