implement rebuild command that reuses git_archive_all

This commit is contained in:
Michael Hobbs
2015-01-27 15:00:00 -08:00
parent 2a756ff3a4
commit 9f985077c7
3 changed files with 35 additions and 2 deletions

View File

@@ -56,6 +56,22 @@ case "$1" in
fi
;;
ps:rebuild)
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
[[ ! -d "$DOKKU_ROOT/$2" ]] && echo "App $2 does not exist" && exit 1
APP="$2"
dokku git-rebuild $APP
;;
ps:rebuildall)
shopt -s nullglob
for app in $DOKKU_ROOT/*/CONTAINER; do
APP=$(basename "$(dirname $app)");
dokku ps:rebuild $APP
done
;;
ps:restart)
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
[[ ! -d "$DOKKU_ROOT/$2" ]] && echo "App $2 does not exist" && exit 1
@@ -79,6 +95,8 @@ case "$1" in
ps <app> List processes running in app container(s)
ps:start <app> Start app container(s)
ps:stop <app> Stop app container(s)
ps:rebuild <app> Rebuild an app
ps:rebuildall Rebuild all apps
ps:restart <app> Restart app container(s)
ps:restartall Restart all deployed app containers
EOF