build/push-official-release.sh checks if proper account is active, not just present

This commit is contained in:
Isaac Hollander McCreery
2016-04-28 10:55:46 -07:00
parent be87587158
commit a9c004640e
2 changed files with 5 additions and 4 deletions

View File

@@ -1516,9 +1516,9 @@ function kube::release::docker::release() {
fi
}
function kube::release::has_gcloud_account() {
function kube::release::gcloud_account_is_active() {
local -r account="${1-}"
if [[ -n $(gcloud auth list --filter-account $account 2>/dev/null) ]]; then
if [[ -n $(gcloud auth list --filter-account $account 2>/dev/null | grep "active") ]]; then
return 0
else
return 1