aligned docker-options into the default 'dokku' listing of plugins

This PR should list the default enabled docker-options plugin in the help listing. This should ease the `discovery` of the plugin.
This commit is contained in:
Robin Speekenbrink committed 2017-05-16 09:26:48 +02:00
1 parent d747e146a6
commit ac96217ac3
1 file changed
+13 -5
+13 -5
View File
@@ -2,9 +2,7 @@
[[ " help docker-options:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" [[ " help docker-options:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
case "$1" in docker_options_help_content_func() {
help | docker-options:help)
help_content_func () {
declare desc="return docker-options plugin help content" declare desc="return docker-options plugin help content"
cat<<help_content cat<<help_content
docker-options <app> [phase(s)], [DEPRECATED] Alternative for docker-options:report docker-options <app> [phase(s)], [DEPRECATED] Alternative for docker-options:report
@@ -14,16 +12,26 @@ case "$1" in
help_content help_content
} }
docker_options_help_cmd() {
if [[ $1 = "docker-options:help" ]] ; then if [[ $1 = "docker-options:help" ]] ; then
echo -e 'Usage: dokku docker-options[:COMMAND]' echo -e 'Usage: dokku docker-options[:COMMAND]'
echo '' echo ''
echo 'Display app'"'"'s Docker options for all phases.' echo 'Display app'"'"'s Docker options for all phases.'
echo '' echo ''
echo 'Additional commands:' echo 'Additional commands:'
help_content_func | sort | column -c2 -t -s, docker_options_help_content_func | sort | column -c2 -t -s,
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
docker_options_help_content_func
else else
help_content_func cat<<help_desc
docker-options, Pass options to Docker the various stages of an app
help_desc
fi fi
}
case "$1" in
help | docker-options:help)
docker_options_help_cmd "$@"
;; ;;
*) *)