Clean up scripts to require a minimal gsutil version.

pull/6/head
Brendan Burns 2014-09-23 11:52:28 -07:00
parent 331fb7e570
commit 4a034b4e77
2 changed files with 12 additions and 0 deletions

View File

@ -17,6 +17,8 @@
# This script will build a dev release and bring up a new cluster with that
# release.
set -e
# First build the binaries
$(dirname $0)/build-go.sh
if [ "$?" != "0" ]; then

View File

@ -23,6 +23,16 @@
# exit on any error
set -e
gsutil_version=$(gsutil version | awk '{split($0,a," "); print a[3]}')
# Warning! uses lexical comparison. This really only works for major versions, or minor versions up to x.9
min_gsutil_version="4.0"
if [[ "$gsutil_version" < "$min_gsutil_version" ]]; then
echo "gsutil version $min_gsutil_version or greater is required, please run 'gcloud components upgrade'"
exit 1
fi
SCRIPT_DIR=$(CDPATH="" cd $(dirname $0); pwd)
source $SCRIPT_DIR/config.sh