Skip to content

Commit

Permalink
cloud: Add function deploy region variable
Browse files Browse the repository at this point in the history
Signed-off-by: Abhishek Kumar <abhishek22512@gmail.com>
  • Loading branch information
octonawish-akcodes authored and spbnick committed Aug 9, 2023
1 parent cb4ed7b commit 712123d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cloud
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,9 @@ function storage_withdraw() {
fi
}

# The region used to host our Cloud Functions
declare -r CLOUD_FUNCTION_REGION="us-central1"

# Deploy a Cloud Function
# Args: project name source [param_arg...]
function cloud_function_deploy() {
Expand All @@ -1285,6 +1288,7 @@ function cloud_function_deploy() {
declare -r source="$1"; shift
verbose echo " Deploying ${name@Q}"
mute gcloud functions deploy --quiet --project="$project" \
--region="$CLOUD_FUNCTION_REGION" \
--source "$source" "$name" "$@"
}

Expand Down

0 comments on commit 712123d

Please sign in to comment.