feat: add support for enhanced help output

This commit is contained in:
Jose Diaz-Gonzalez
2017-09-11 01:25:25 -04:00
parent 6684ff4f31
commit e5bead2f82
28 changed files with 564 additions and 230 deletions

View File

@@ -2,6 +2,7 @@
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/config"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common-functions"
source "$PLUGIN_BASE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
if [[ -f "$PLUGIN_AVAILABLE_PATH/docker-options/functions" ]]; then
source "$PLUGIN_AVAILABLE_PATH/docker-options/functions"
@@ -9,6 +10,17 @@ fi
# non-generic functions
service_connect() {
local SERVICE="$1"
local SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE"
local SERVICE_NAME="$(get_service_name "$SERVICE")"
local PASSWORD="$(cat "$SERVICE_ROOT/PASSWORD")"
local SERVICE_TTY_OPTS
has_tty && SERVICE_TTY_OPTS="-t"
docker exec -i $SERVICE_TTY_OPTS "$SERVICE_NAME" mysql --user=mysql --password="$PASSWORD" --database="$SERVICE"
}
service_create() {
local SERVICE="$1"
[[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service"