mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
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 () {
|
||||
declare desc="return apps plugin 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:create <app>, Create a new app
|
||||
apps:destroy <app>, Permanently destroy an app
|
||||
apps:list, List your apps
|
||||
apps:rename <old-app> <new-app>, Rename an app
|
||||
apps:report [<app>] [<flag>], Display report about an app
|
||||
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
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions"
|
||||
|
||||
apps_main_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
|
||||
}
|
||||
|
||||
apps_main_cmd "$@"
|
||||
dokku_log_warn "Deprecated: Please use apps:list"
|
||||
apps_list_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