Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further error handling when gcloud isn't set up correctly. #112

Merged
merged 1 commit into from Jun 14, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions release/config.sh
Expand Up @@ -19,8 +19,18 @@ if [ "$(which gcloud)" == "" ]; then
exit 1
fi

if [ -n "$(gcloud auth list 2>&1 | grep 'No credentialed accounts')" ]; then
gcloud auth login
fi

PROJECT=$(gcloud config list project | tail -n 1 | cut -f 3 -d ' ')

if [ ! -n "$PROJECT" ]; then
echo "Default project is not set."
echo "Please run gcloud config set project <project>"
exit 1
fi

if which md5 > /dev/null; then
HASH=$(md5 -q -s $PROJECT)
else
Expand Down