mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #3528 from satnam6502/fixoutput
Report project and zone only once for GCE
This commit is contained in:
commit
0b9f6bc8bb
@ -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