Skip to content

Commit

Permalink
Fixes string replacement for api service names with multiple slashes.
Browse files Browse the repository at this point in the history
See bcgov/TheOrgBook#867

Signed-off-by: Wade Barnes <wade.barnes@shaw.ca>
  • Loading branch information
WadeBarnes committed Mar 2, 2020
1 parent 403def4 commit 55a230b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openshift/templates/runtime/s2i/bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ getApiUrl() {
# Results in API_URL=https://django-devex-von-dev.pathfinder.gov.bc.ca/api/v1/
# ================================================================================
if [ ! -z "${API_SERVICE_NAME}" ]; then
_SERVICE_NAME="$(tr '[:lower:]' '[:upper:]' <<< ${API_SERVICE_NAME/-/_})"
_SERVICE_NAME="$(tr '[:lower:]' '[:upper:]' <<< ${API_SERVICE_NAME//-/_})"
_SERVICE_HOST_NAME=${_SERVICE_NAME}_SERVICE_HOST
_SERVICE_PORT_NAME=${_SERVICE_NAME}_SERVICE_PORT
if [ ! -z "${!_SERVICE_HOST_NAME}" ]; then
Expand Down

0 comments on commit 55a230b

Please sign in to comment.