Sha256: ff2ea1b9edcb71fa548678043235cb4e9ff72e43d6f09047dae2f497b0712317

Contents?: true

Size: 1.01 KB

Versions: 5

Compression:

Stored size: 1.01 KB

Contents

#!/bin/bash

#
# This script is used to execute non-ruby service hooks. It's called from
# EY::Serverside::Deploy#callback. If you'd like to call it directly you should
# be careful to replicate everything done in EY::Serverside::Deploy or your
# hook code may not execute as planned.
#

set -o nounset

abort() {
  echo "$*"
  exit 1
}

HOOK=${1:-}
[ -n "${HOOK}" ] || abort "No hook name provided."

# We run all deploy hooks from the root directory of the current release of
# their app.
[ -n "${EY_DEPLOY_RELEASE_PATH:-}" ] || abort "EY_DEPLOY_RELEASE_PATH must be set."
[ -d ${EY_DEPLOY_RELEASE_PATH} ] || abort "EY_DEPLOY_RELEASE_PATH must exist and be a directory"
cd ${EY_DEPLOY_RELEASE_PATH}

# Set up the service hook paths
_app_path=$(dirname $(dirname ${EY_DEPLOY_RELEASE_PATH}))
_service_hooks_path="${_app_path}/shared/hooks"

# Run the hook.
_hook_path="${_service_hooks_path}/${HOOK}"
if [ ! \( -f ${_hook_path} -a -x ${_hook_path} \) ]; then
  abort "${_hook_path} must exist and be executable"
fi
exec ${_hook_path}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
engineyard-serverside-3.0.4 bin/engineyard-serverside-execute-service-hook
engineyard-serverside-3.0.3 bin/engineyard-serverside-execute-service-hook
engineyard-serverside-2.8.0 bin/engineyard-serverside-execute-service-hook
engineyard-serverside-2.8.0.pre4 bin/engineyard-serverside-execute-service-hook
engineyard-serverside-2.8.0.pre3 bin/engineyard-serverside-execute-service-hook