engineyard/engineyard-serverside — pull request #100 by conormcd (2014-05-28 13:03:36+00:00)
Title: Execute non-Ruby hooks.

If `deploy/x.rb` does not exist and if `deploy/x` does exist AND is executable then `deploy/x` is executed.

This does not add any extra hook points. The user may mix and match ruby and executable hooks *but* only one hook script will be executed per hook point and the Ruby one has precedence.

There are several environment variables made available to the hook programs and they are as follows:

- `ACCOUNT_NAME` - The name of the account which owns the app.
- `APP` - The application's name
- `CONFIG` - A JSON blob containing the deploy configuration information.
- `CURRENT_NAME` - If the server is a utility instance, this is the name of the server. It's unset for all other server types.
- `CURRENT_ROLES` - The roles of the server the hook is being run on.
- `ENVIRONMENT_NAME` - The name of the environment in which the app is running.
- `FRAMEWORK_ENV` - The value for `RAILS_ENV` et al. This is copied into `RAILS_ENV`, `RACK_ENV`, `NODE_ENV` and `MERB_ENV`.
- `RELEASE_PATH` - The full path to the directory containing the release of the application which is being deployed.
- `VERBOSE` - `1` if the deploy is being done with verbose logging, `0` otherwise.