chore: moving line to be consistent.

This commit is contained in:
Robert Wlodarczyk 2022-07-16 10:40:02 -07:00
parent 9316c9f5c2
commit 0643e9ceae

View File

@ -67,13 +67,13 @@ slugify() {
make_image_cmd() { make_image_cmd() {
DOCKERARGS=$(echo "${1}" | jq -r .dockerargs) DOCKERARGS=$(echo "${1}" | jq -r .dockerargs)
if [ "${DOCKERARGS}" == "null" ]; then DOCKERARGS=; fi
VOLUMES=$(echo "${1}" | jq -r 'select(.volumes != null) | .volumes | map(" -v " + .) | join("")') VOLUMES=$(echo "${1}" | jq -r 'select(.volumes != null) | .volumes | map(" -v " + .) | join("")')
PORTS=$(echo "${1}" | jq -r 'select(.ports != null) | .ports | map(" -p " + .) | join("")') PORTS=$(echo "${1}" | jq -r 'select(.ports != null) | .ports | map(" -p " + .) | join("")')
EXPOSE=$(echo "${1}" | jq -r 'select(.expose != null) | .expose | map(" --expose " + .) | join("")') EXPOSE=$(echo "${1}" | jq -r 'select(.expose != null) | .expose | map(" --expose " + .) | join("")')
NAME=$(echo "${1}" | jq -r 'select(.name != null) | .name') NAME=$(echo "${1}" | jq -r 'select(.name != null) | .name')
NETWORK=$(echo "${1}" | jq -r 'select(.network != null) | .network') NETWORK=$(echo "${1}" | jq -r 'select(.network != null) | .network')
ENVIRONMENT=$(echo "${1}" | jq -r 'select(.environment != null) | .environment | map(" -e " + .) | join("")') ENVIRONMENT=$(echo "${1}" | jq -r 'select(.environment != null) | .environment | map(" -e " + .) | join("")')
if [ "${DOCKERARGS}" == "null" ]; then DOCKERARGS=; fi
if [ -n "${NAME}" ]; then DOCKERARGS+=" --rm --name ${NAME} "; fi if [ -n "${NAME}" ]; then DOCKERARGS+=" --rm --name ${NAME} "; fi
if [ -n "${NETWORK}" ]; then DOCKERARGS+=" --network ${NETWORK} "; fi if [ -n "${NETWORK}" ]; then DOCKERARGS+=" --network ${NETWORK} "; fi
if [ -n "${VOLUMES}" ]; then DOCKERARGS+="${VOLUMES}"; fi if [ -n "${VOLUMES}" ]; then DOCKERARGS+="${VOLUMES}"; fi