diff --git a/deploy-via-gcloud.sh b/deploy-via-gcloud.sh index 0f2529e..4eb6c46 100755 --- a/deploy-via-gcloud.sh +++ b/deploy-via-gcloud.sh @@ -2,14 +2,16 @@ set -e # fail on any error set -o pipefail # ensure non-zero exit codes are propagated in piped commands -entry_point="watchdogNotifier" -function_name="watchdog-notifications" region="europe-west1" printf "Looking up function name..." function_name=$(gcloud functions list --format="value(name)" | grep '^watchdog-notifications') printf ' \033[1m%s\033[0m\n' "${function_name}" +printf "Looking up entry point..." +entry_point=$(gcloud functions describe "${function_name}" --region="${region}" --format json | jq .buildConfig.entryPoint) +printf ' \033[1m%s\033[0m\n' "${entry_point}" + printf "Looking up project ID..." project_name="governance-watchdog" project_id=$(gcloud projects list --filter="name:${project_name}*" --format="value(projectId)")