feat: implement apps:list
Also deprecate the `apps` command in favor of `apps:list`
This commit is contained in:
@@ -7,10 +7,11 @@ case "$1" in
|
|||||||
help_content_func () {
|
help_content_func () {
|
||||||
declare desc="return apps plugin help content"
|
declare desc="return apps plugin help content"
|
||||||
cat<<help_content
|
cat<<help_content
|
||||||
apps, List your apps
|
apps, Alias for apps:list (Deprecated)
|
||||||
apps:clone <old-app> <new-app>, Clones an app
|
apps:clone <old-app> <new-app>, Clones an app
|
||||||
apps:create <app>, Create a new app
|
apps:create <app>, Create a new app
|
||||||
apps:destroy <app>, Permanently destroy an app
|
apps:destroy <app>, Permanently destroy an app
|
||||||
|
apps:list, List your apps
|
||||||
apps:rename <old-app> <new-app>, Rename an app
|
apps:rename <old-app> <new-app>, Rename an app
|
||||||
apps:report [<app>] [<flag>], Display report about an app
|
apps:report [<app>] [<flag>], Display report about an app
|
||||||
help_content
|
help_content
|
||||||
|
|||||||
14
plugins/apps/internal-functions
Executable file
14
plugins/apps/internal-functions
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
|
|
||||||
|
apps_list_cmd() {
|
||||||
|
declare desc="lists all apps"
|
||||||
|
local cmd="apps"
|
||||||
|
local app
|
||||||
|
|
||||||
|
dokku_log_info2_quiet "My Apps"
|
||||||
|
for app in $(dokku_apps); do
|
||||||
|
echo "$app"
|
||||||
|
done
|
||||||
|
}
|
||||||
@@ -1,16 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions"
|
||||||
|
|
||||||
apps_main_cmd() {
|
dokku_log_warn "Deprecated: Please use apps:list"
|
||||||
declare desc="lists all apps"
|
apps_list_cmd "$@"
|
||||||
local cmd="apps"
|
|
||||||
local app
|
|
||||||
|
|
||||||
dokku_log_info2_quiet "My Apps"
|
|
||||||
for app in $(dokku_apps); do
|
|
||||||
echo "$app"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
apps_main_cmd "$@"
|
|
||||||
|
|||||||
5
plugins/apps/subcommands/list
Executable file
5
plugins/apps/subcommands/list
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions"
|
||||||
|
|
||||||
|
apps_list_cmd "$@"
|
||||||
Reference in New Issue
Block a user