mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
Merge pull request #3699 from robhudson/add-cleanup-help
Add `dokku cleanup` to help output
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
[[ " help help:help run:help trace:help url:help urls:help version:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
[[ " help help:help cleanup:help run:help trace:help url:help urls:help version:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
case "$1" in
|
||||
help | run:help | trace:help | url:help | urls:help | version:help)
|
||||
help | cleanup:help | run:help | trace:help | url:help | urls:help | version:help)
|
||||
[[ $(echo "$1" | sed '/.*:help/!d') ]] && help_topic="${1%\:help}"
|
||||
help_content_func() {
|
||||
declare desc="return standard plugin help content"
|
||||
cat <<help_content
|
||||
cleanup [<app>], Cleans up exited/dead Docker containers and removes dangling images
|
||||
run [--env KEY=VALUE] <app> <cmd>, Run a command in a new container using the current application image
|
||||
url <app>, Show the first URL for an application (compatibility)
|
||||
urls <app>, Show all URLs for an application
|
||||
|
||||
@@ -31,6 +31,13 @@ assert_url() {
|
||||
assert_output "${url}"
|
||||
}
|
||||
|
||||
@test "(core) cleanup:help" {
|
||||
run /bin/bash -c "dokku cleanup:help"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_output_contains "Cleans up exited/dead Docker containers and removes dangling image"
|
||||
}
|
||||
|
||||
@test "(core) run (with --options)" {
|
||||
deploy_app
|
||||
run /bin/bash -c "dokku --force --quiet run $TEST_APP node --version"
|
||||
|
||||
Reference in New Issue
Block a user