move release_and_deploy to plugin functions. only attempt Procfile copy if we're buildstep based

This commit is contained in:
Michael Hobbs
2015-04-21 20:17:14 -07:00
parent 807e1b97b4
commit 2cb957d1dd
2 changed files with 33 additions and 27 deletions

View File

@@ -3,27 +3,6 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname $0)/../common/functions"
source "$(dirname $0)/functions"
release_and_deploy() {
source "$(dirname $0)/../common/functions"
local APP="$1"; local IMAGE="dokku/$APP"
if verify_app_image "$APP"; then
if is_image_buildstep_based "$IMAGE"; then
IMAGE_SOURCE_TYPE="buildstep"
else
IMAGE_SOURCE_TYPE="dockerfile"
fi
dokku_log_info1 "Releasing $APP ..."
dokku release "$APP" "$IMAGE_SOURCE_TYPE"
dokku_log_info1 "Deploying $APP ..."
dokku deploy "$APP"
dokku_log_info2 "Application deployed:"
dokku urls $APP | sed "s/^/ /"
echo
fi
}
case "$1" in
ps)
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1