Skip to content

Commit ce60feb

Browse files
committed
Fixes for Codacy
1 parent 7878181 commit ce60feb

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

broker/cloud_run/lsst/classify_snn/construct-name.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
#!/bin/bash
22

3-
_usage() {
4-
echo "Usage: $0 [-s|--stem] <stem> [[-g|--gcp-service] <gcp_service>]"
5-
}
6-
73
_info() {
8-
echo "Use '$(basename $0) --help' for more information."
4+
echo "Use '$(basename "$0") --help' for more information."
95
}
106

117
_help() {
128
echo "Construct the GCP resource name using the supplied options and the env vars SURVEY and TESTID."
139
echo
14-
_usage
10+
echo "Usage: $0 [-s|--stem] <stem> [[-g|--gcp-service] <gcp_service>]"
1511
echo
1612
echo "Options:"
1713
echo " -s, --stem <stem> Name stem for the resource. SURVEY will be prepended and TESTID "

broker/cloud_run/lsst/classify_snn/create-ancillaries.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ bq_table_supernnova="supernnova"
1010
ps_topic_out=$(construct-name.sh --stem "supernnova")
1111
ps_topic_bqimport=$(construct-name.sh --stem "bigquery-import-supernnova")
1212
ps_topic_bqimport_deadletter=$(construct-name.sh --stem "bigquery-import-supernnova-deadletter")
13-
ps_subscrip_trigger="$_TRIGGER_TOPIC"
1413
ps_subscrip_bqimport="$ps_topic_bqimport"
1514
ps_subscrip_bqimport_deadletter="$ps_topic_bqimport_deadletter"
1615

broker/cloud_run/lsst/classify_snn/deploy.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
# Build the image, create ancillary resources, and deploy the module as a Cloud Run service.
33
#
44
# --------- Example usage -----------------------
5-
# First, double check the values in env.yaml. Then:
5+
#
6+
# First, double check the values in env.yaml. Then:
7+
#
68
# $ gcloud auth ...
7-
# $ export PROJECT_ID=... (is this set automatically by gcloud auth?)
8-
# $ bash deploy.sh
9+
# $ export PROJECT_ID=... (Is this set automatically by gcloud auth?)
10+
# $ bash deploy.sh # That's it. All variables retrieved from env.yaml.
11+
#
912
# -----------------------------------------------
1013

1114
# --------- Set environment variables -----------
@@ -31,9 +34,12 @@ check_env_vars PROJECT_ID _SURVEY _TESTID MODULE_NAME_STEM MODULE_ROUTE REGION R
3134

3235
# Construct and export additional environment variables for cloudbuild.yaml.
3336
# Environment variables that will be used by cloudbuild.yaml must start with "_", per GCP's requirements.
34-
export _MODULE_NAME=$(construct-name.sh --stem "$MODULE_NAME_STEM")
35-
export _REPOSITORY=$(construct-name.sh --stem "$REPOSITORY_STEM")
36-
export _TRIGGER_TOPIC=$(construct-name.sh --stem "$TRIGGER_TOPIC_STEM")
37+
_MODULE_NAME=$(construct-name.sh --stem "$MODULE_NAME_STEM")
38+
export _MODULE_NAME="$_MODULE_NAME"
39+
_REPOSITORY=$(construct-name.sh --stem "$REPOSITORY_STEM")
40+
export _REPOSITORY="$_REPOSITORY"
41+
_TRIGGER_TOPIC=$(construct-name.sh --stem "$TRIGGER_TOPIC_STEM")
42+
export _TRIGGER_TOPIC="$_TRIGGER_TOPIC"
3743
# -----------------------------------------------
3844

3945
# --------- Project setup -----------------------

0 commit comments

Comments
 (0)