Skip to content

Commit

Permalink
Clean up scripts to require a minimal gsutil version.
Browse files Browse the repository at this point in the history
  • Loading branch information
brendandburns committed Sep 24, 2014
1 parent 331fb7e commit 4a034b4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hack/dev-build-and-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions release/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4a034b4

Please sign in to comment.