Skip to content

Commit

Permalink
Add subdomain to url if specified
Browse files Browse the repository at this point in the history
  • Loading branch information
bap14 committed Jul 30, 2023
1 parent 9b3c387 commit e942e66
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion commands/status.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@ for projectNetwork in "${projectNetworkList[@]}"; do
projectName=$(cat "${projectDir}/.env" | grep '^WARDEN_ENV_NAME=' | sed -e 's/WARDEN_ENV_NAME=[[:space:]]*//g')
projectType=$(cat "${projectDir}/.env" | grep '^WARDEN_ENV_TYPE=' | sed -e 's/WARDEN_ENV_TYPE=[[:space:]]*//g')
traefikDomain=$(cat "${projectDir}/.env" | grep '^TRAEFIK_DOMAIN=' | sed -e 's/TRAEFIK_DOMAIN=[[:space:]]*//g')
traefikSubdomain=$(cat "${projectDir}/.env" | grep '^TRAEFIK_SUBDOMAIN=' | sed -e 's/TRAEFIK_SUBDOMAIN=[[:space:]]*//g')

fullDomain="${traefikDomain}"
if test -n "${traefikSubdomain}"; then
fullDomain="${traefikSubdomain}.${traefikDomain}"
fi

messageList+=(" \033[1;35m${projectName}\033[0m a \033[36m${projectType}\033[0m project")
messageList+=(" Project Directory: \033[33m${projectDir}\033[0m")
messageList+=(" Project URL: \033[94mhttps://${traefikDomain}\033[0m")
messageList+=(" Project URL: \033[94mhttps://${fullDomain}\033[0m")

[[ "$projectNetwork" != "${projectNetworkList[@]: -1:1}" ]] && messageList+=()
done
Expand Down

0 comments on commit e942e66

Please sign in to comment.