Files
watchparty/functions/gcdeploy.sh
T

8 lines
465 B
Bash

#!/bin/bash
for api in $(gcloud functions list --filter="name:( api- )" --format="csv[no-heading](NAME,REGION)")
do
apiName="$(cut -d',' -f1 <<<"$api")"
apiRegion="$(cut -d',' -f2 <<<"$api")"
echo $'\n'==========================================================$'\n'API: "$apiName" $'\t'REGION: "$apiRegion"$'\n'==========================================================$'\n'
$(gcloud functions deploy $apiName --region $apiRegion --entry-point widgets)
done