feat: add support for enhanced help output
This commit is contained in:
@@ -4,14 +4,18 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_BASE_PATH/common/functions"
|
||||
source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/functions"
|
||||
|
||||
mysql-expose-cmd() {
|
||||
service-expose-cmd() {
|
||||
#E expose the service on the service's normal ports, allowing access to it from the public interface (0.0.0.0)
|
||||
#E dokku $PLUGIN_COMMAND_PREFIX:expose lolipop ${PLUGIN_DATASTORE_PORTS[@]}
|
||||
#A service, service to run command against
|
||||
#A ports, a list of ports to run against
|
||||
declare desc="expose a $PLUGIN_SERVICE service on custom port if provided (random port otherwise)"
|
||||
local cmd="$PLUGIN_COMMAND_PREFIX:expose" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
declare SERVICE="$1" PORTS="${@:2}"
|
||||
declare SERVICE="$1" PORTS_LIST="${@:2}"
|
||||
|
||||
[[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service"
|
||||
verify_service_name "$SERVICE"
|
||||
service_port_expose "$SERVICE" "${@:2}"
|
||||
}
|
||||
|
||||
mysql-expose-cmd "$@"
|
||||
service-expose-cmd "$@"
|
||||
|
||||
Reference in New Issue
Block a user