Merge branch 'feature/support-tableplus' into 'main'

Add support for TablePlus on macOS

See merge request ujamii_dev/auto-dev-reverse-proxy!7
This commit is contained in:
Eric Enold 2023-06-07 12:45:13 +00:00
commit 9997f8345f

View file

@ -148,6 +148,9 @@ run_client() {
if [ -d "/Applications/Sequel Ace.app" ] && [ "${USE_CLI}" != true ]
then
open "mysql://$2:$3@${SQL_PROXY_HOST}:6033/${4}" -a "Sequel Ace"
elif [ -d "/Applications/TablePlus.app" ] && [ "${USE_CLI}" != true ]
then
open "mysql://$2:$3@${SQL_PROXY_HOST}:6033/${4}" -a "TablePlus"
elif which mysql >/dev/null 2>&1
then
mysql --protocol=TCP -u "$2" -p"$3" -h "${SQL_PROXY_HOST}" "${4:+-D$4}" -P 6033
@ -156,7 +159,10 @@ run_client() {
fi
elif [ "$1" = 'postgres' ]
then
if which psql >/dev/null 2>&1
if [ -d "/Applications/TablePlus.app" ] && [ "${USE_CLI}" != true ]
then
open "postgresql://$2:$3@${SQL_PROXY_HOST}:6033/${4:-postgres}" -a "TablePlus"
elif which psql >/dev/null 2>&1
then
psql "postgresql://$2:$3@${SQL_PROXY_HOST}:6033/${4:-postgres}"
else