adding some basic help, also as another example of using plugin hooks

This commit is contained in:
Jeff Lindsay committed 2013-06-30 15:51:41 -05:00
1 parent 997d2dd09c
commit 60f29cdb18
3 files changed
+22 -2

No files matched your search

+12 -2
View File
@@ -1,12 +1,12 @@
#!/bin/bash #!/bin/bash
set -e set -e
export PLUGIN_PATH="/var/lib/dokku/plugins" export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"}
case "$1" in case "$1" in
receive) receive)
APP="$2"; IMAGE="app/$APP" APP="$2"; IMAGE="app/$APP"
echo "-----> Building $APP ..." echo "-----> Building $APP ..."
cat | dokku build $IMAGE cat | dokku build $IMAGE
echo "=====> Build complete!" echo "-----> Build complete!"
echo "-----> Deploying $APP ..." echo "-----> Deploying $APP ..."
dokku deploy $APP $IMAGE dokku deploy $APP $IMAGE
echo "=====> Application deployed:" echo "=====> Application deployed:"
@@ -45,6 +45,16 @@ case "$1" in
pluginhook post-deploy $APP $port pluginhook post-deploy $APP $port
;; ;;
plugins) ls -1 -d $PLUGIN_PATH/*/
;;
help)
cat<<EOF | pluginhook commands help | sort
help Print the list of commands
plugins Print active plugins
EOF
;;
*) *)
pluginhook commands "$@" pluginhook commands "$@"
;; ;;
+7
View File
@@ -9,4 +9,11 @@ set -e; case "$1" in
echo "http://$(< "/home/git/$2/ADDRESS")" echo "http://$(< "/home/git/$2/ADDRESS")"
;; ;;
help)
cat && cat<<EOF
logs <app> Show the last logs for an application
url <app> Show the URL for an application
EOF
;;
esac esac
+3
View File
@@ -9,4 +9,7 @@ set -e; case "$1" in
fi fi
;; ;;
help) cat
;;
esac esac