mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Report project and zone only once
This commit is contained in:
parent
2dce916276
commit
9ba6525597
@ -74,6 +74,7 @@ function find-release-tars {
|
||||
#
|
||||
# Vars set:
|
||||
# PROJECT
|
||||
# PROJECT_REPORTED
|
||||
function detect-project () {
|
||||
if [[ -z "${PROJECT-}" ]]; then
|
||||
PROJECT=$(gcloud config list project | tail -n 1 | cut -f 3 -d ' ')
|
||||
@ -84,7 +85,11 @@ function detect-project () {
|
||||
echo "'gcloud config set project <PROJECT>'" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Project: $PROJECT" >&2
|
||||
if [[ -z "${PROJECT_REPORTED-}" ]]; then
|
||||
echo "Project: ${PROJECT}" >&2
|
||||
echo "Zone: ${ZONE}" >&2
|
||||
PROJECT_REPORTED=true
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user