feat: create repo:default alias for repo:help
This commit is contained in:
1 parent
0153bc49bc
commit
4930003008
3 files changed
+34
-18
No files matched your search
+2
-18
@@ -1,27 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
[[ " help repo:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
[[ " help repo:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||||
|
source "$PLUGIN_AVAILABLE_PATH/repo/internal-functions"
|
||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
help | repo:help)
|
help | repo:help)
|
||||||
help_content_func () {
|
repo_help_cmd "$@"
|
||||||
declare desc="return repo plugin help content"
|
|
||||||
cat<<help_content
|
|
||||||
repo:gc <app>, Runs 'git gc --aggressive' against the application's repo
|
|
||||||
repo:purge-cache <app>, Deletes the contents of the build cache stored in the repository
|
|
||||||
help_content
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ $1 = "repo:help" ]] ; then
|
|
||||||
echo -e 'Usage: dokku repo[:COMMAND]'
|
|
||||||
echo ''
|
|
||||||
echo "Runs commands that interact with the app's repo"
|
|
||||||
echo ''
|
|
||||||
echo 'Additional commands:'
|
|
||||||
help_content_func | sort | column -c2 -t -s,
|
|
||||||
else
|
|
||||||
help_content_func
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
repo_help_content_func () {
|
||||||
|
declare desc="return repo plugin help content"
|
||||||
|
cat<<help_content
|
||||||
|
repo:gc <app>, Runs 'git gc --aggressive' against the application's repo
|
||||||
|
repo:purge-cache <app>, Deletes the contents of the build cache stored in the repository
|
||||||
|
help_content
|
||||||
|
}
|
||||||
|
|
||||||
|
repo_help_cmd() {
|
||||||
|
if [[ $1 = "repo:help" ]] ; then
|
||||||
|
echo -e 'Usage: dokku repo[:COMMAND]'
|
||||||
|
echo ''
|
||||||
|
echo "Runs commands that interact with the app's repo"
|
||||||
|
echo ''
|
||||||
|
echo 'Additional commands:'
|
||||||
|
repo_help_content_func | sort | column -c2 -t -s,
|
||||||
|
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
|
||||||
|
repo_help_content_func
|
||||||
|
else
|
||||||
|
cat<<help_desc
|
||||||
|
repo, Runs commands that interact with the app's repo
|
||||||
|
help_desc
|
||||||
|
fi
|
||||||
|
}
|
||||||
Executable
+5
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
source "$PLUGIN_AVAILABLE_PATH/repo/internal-functions"
|
||||||
|
|
||||||
|
repo_help_cmd "repo:help"
|
||||||
Reference in new issue
Block a user