Skip to content

Commit

Permalink
format changes to setup_broker.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
hernandezc1 committed Oct 17, 2024
1 parent b0dc024 commit 4402456
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions broker/setup_broker/lvk/setup_broker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ if [ "${teardown}" != "True" ]; then
# create bigquery dataset and table
bq --location="${region}" mk --dataset "${bq_dataset}"

cd templates && bq mk --table "${PROJECT_ID}:${bq_dataset}.${alerts_table}" "bq_${survey}_${alerts_table}_schema.json" || exit 5
cd templates

Check warning on line 61 in broker/setup_broker/lvk/setup_broker.sh

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

broker/setup_broker/lvk/setup_broker.sh#L61

Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
bq mk --table "${PROJECT_ID}:${bq_dataset}.${alerts_table}" "bq_${survey}_${alerts_table}_schema.json" || exit 5
cd .. || exit 5

# create broker bucket and upload files
Expand Down Expand Up @@ -99,7 +100,7 @@ echo "Configuring Cloud Functions..."
cd .. && cd .. && cd cloud_functions && cd lvk || exit 5

#--- BigQuery storage cloud function
cd store_BigQuery && ./deploy.sh "$testid" "$teardown" "$survey" "$versiontag"|| exit 5
cd store_BigQuery && ./deploy.sh "$testid" "$teardown" "$survey" "$versiontag" || exit 5

#--- return to setup_broker/lvk directory
cd .. && cd .. && cd .. && cd setup_broker && cd lvk || exit 5

0 comments on commit 4402456

Please sign in to comment.