Merge pull request #2616 from dokku/2356-apps-report-cleanup
Replace apps subcommand with apps:list
This commit is contained in:
commit
ba7f9b8f87
7 files changed
+73
-51
No files matched your search
@@ -3,10 +3,10 @@
|
|||||||
> New as of 0.3.1
|
> New as of 0.3.1
|
||||||
|
|
||||||
```
|
```
|
||||||
apps # List your apps
|
|
||||||
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
|
||||||
```
|
```
|
||||||
@@ -15,10 +15,12 @@ apps:report [<app>] [<flag>] # Display report about an app
|
|||||||
|
|
||||||
### Listing Applications
|
### Listing Applications
|
||||||
|
|
||||||
You can easily list all available applications using the `apps` command:
|
> New as of 0.8.1. Use the `apps` command for older versions.
|
||||||
|
|
||||||
|
You can easily list all available applications using the `apps:list` command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku apps
|
dokku apps:list
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -30,7 +32,7 @@ python-app
|
|||||||
Note that you can easily hide extra output from Dokku commands by using the `--quiet` flag, which makes it easier to parse on the command-line.
|
Note that you can easily hide extra output from Dokku commands by using the `--quiet` flag, which makes it easier to parse on the command-line.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku --quiet apps
|
dokku --quiet apps:list
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -179,6 +181,7 @@ dokku apps:report node-js-app
|
|||||||
```
|
```
|
||||||
|
|
||||||
You can pass flags which will output only the value of the specific information you want. For example:
|
You can pass flags which will output only the value of the specific information you want. For example:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku apps:report node-js-app --git-sha
|
dokku apps:report node-js-app --git-sha
|
||||||
```
|
```
|
||||||
+2
-29
@@ -1,38 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
[[ " help apps:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
[[ " help apps:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||||
|
source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions"
|
||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
help | apps:help)
|
help | apps:help)
|
||||||
help_content_func () {
|
apps_help_cmd "$@"
|
||||||
declare desc="return apps plugin help content"
|
|
||||||
cat<<help_content
|
|
||||||
apps, List your apps
|
|
||||||
apps:clone <old-app> <new-app>, Clones an app
|
|
||||||
apps:create <app>, Create a new app
|
|
||||||
apps:destroy <app>, Permanently destroy an app
|
|
||||||
apps:rename <old-app> <new-app>, Rename an app
|
|
||||||
apps:report [<app>] [<flag>], Display report about an app
|
|
||||||
help_content
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ $1 = "apps:help" ]] ; then
|
|
||||||
echo -e 'Usage: dokku apps[:COMMAND]'
|
|
||||||
echo ''
|
|
||||||
echo 'List your apps.'
|
|
||||||
echo ''
|
|
||||||
echo 'Example:'
|
|
||||||
echo ''
|
|
||||||
echo '$ dokku apps'
|
|
||||||
echo '=====> My Apps'
|
|
||||||
echo 'example'
|
|
||||||
echo 'example2'
|
|
||||||
echo ''
|
|
||||||
echo 'Additional commands:'
|
|
||||||
help_content_func | sort | column -c2 -t -s,
|
|
||||||
else
|
|
||||||
help_content_func
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|||||||
Executable
+51
@@ -0,0 +1,51 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
|
|
||||||
|
apps_help_content_func() {
|
||||||
|
declare desc="return apps plugin help content"
|
||||||
|
cat<<help_content
|
||||||
|
apps, [DEPRECATED] Alias for apps:list
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
apps_help_cmd() {
|
||||||
|
if [[ $1 = "apps:help" ]] ; then
|
||||||
|
echo -e 'Usage: dokku apps[:COMMAND]'
|
||||||
|
echo ''
|
||||||
|
echo 'Manage Dokku apps'
|
||||||
|
echo ''
|
||||||
|
echo 'Example:'
|
||||||
|
echo ''
|
||||||
|
echo '$ dokku apps'
|
||||||
|
echo '=====> My Apps'
|
||||||
|
echo 'example'
|
||||||
|
echo 'example2'
|
||||||
|
echo ''
|
||||||
|
echo 'Additional commands:'
|
||||||
|
apps_help_content_func | sort | column -c2 -t -s,
|
||||||
|
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
|
||||||
|
apps_help_content_func
|
||||||
|
else
|
||||||
|
cat<<help_desc
|
||||||
|
apps, Manage Dokku apps
|
||||||
|
help_desc
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
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 "$@"
|
|
||||||
Executable
+5
@@ -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 "$@"
|
||||||
@@ -65,7 +65,7 @@ report_single_app() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apps_report_cmd() {
|
apps_report_cmd() {
|
||||||
declare desc="shows reports for an app"
|
declare desc="displays the app report for one or more apps"
|
||||||
local cmd="apps:report"
|
local cmd="apps:report"
|
||||||
local INSTALLED_APPS=$(dokku_apps)
|
local INSTALLED_APPS=$(dokku_apps)
|
||||||
local APP
|
local APP
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ teardown () {
|
|||||||
echo "output: "$output
|
echo "output: "$output
|
||||||
echo "status: "$status
|
echo "status: "$status
|
||||||
assert_success
|
assert_success
|
||||||
run bash -c "dokku apps | grep $TEST_APP"
|
run bash -c "dokku apps:list | grep $TEST_APP"
|
||||||
echo "output: "$output
|
echo "output: "$output
|
||||||
echo "status: "$status
|
echo "status: "$status
|
||||||
assert_output $TEST_APP
|
assert_output $TEST_APP
|
||||||
@@ -36,7 +36,7 @@ teardown () {
|
|||||||
echo "output: "$output
|
echo "output: "$output
|
||||||
echo "status: "$status
|
echo "status: "$status
|
||||||
assert_success
|
assert_success
|
||||||
run bash -c "dokku apps | grep $TEST_APP"
|
run bash -c "dokku apps:list | grep $TEST_APP"
|
||||||
echo "output: "$output
|
echo "output: "$output
|
||||||
echo "status: "$status
|
echo "status: "$status
|
||||||
assert_output $TEST_APP
|
assert_output $TEST_APP
|
||||||
@@ -64,7 +64,7 @@ teardown () {
|
|||||||
echo "output: "$output
|
echo "output: "$output
|
||||||
echo "status: "$status
|
echo "status: "$status
|
||||||
assert_success
|
assert_success
|
||||||
run bash -c "dokku apps | grep $TEST_APP"
|
run bash -c "dokku apps:list | grep $TEST_APP"
|
||||||
echo "output: "$output
|
echo "output: "$output
|
||||||
echo "status: "$status
|
echo "status: "$status
|
||||||
assert_output ""
|
assert_output ""
|
||||||
@@ -97,7 +97,7 @@ teardown () {
|
|||||||
echo "output: "$output
|
echo "output: "$output
|
||||||
echo "status: "$status
|
echo "status: "$status
|
||||||
assert_success
|
assert_success
|
||||||
run bash -c "dokku apps | grep $TEST_APP"
|
run bash -c "dokku apps:list | grep $TEST_APP"
|
||||||
echo "output: "$output
|
echo "output: "$output
|
||||||
echo "status: "$status
|
echo "status: "$status
|
||||||
assert_success
|
assert_success
|
||||||
|
|||||||
Reference in new issue
Block a user