Created
March 26, 2012 16:27
-
-
Save joshstrange/2206333 to your computer and use it in GitHub Desktop.
Pre/Post beanstalk hooks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define('API_KEY', '[YOUR KEY]'); | |
define('API_SEC', '[YOUR SECRET]'); | |
define('YOUR_EMAIL', '[YOUR EMAIL]'); | |
if (!function_exists('curl_init')) { | |
trigger_error('CURL must be enabled for boxcar_api to function', E_USER_ERROR); | |
} | |
// load the api class | |
require_once 'boxcar_api.php'; | |
// this is needed to stop warnings when using the date functions | |
date_default_timezone_set('America/Kentucky/Louisville'); | |
$b = new boxcar_api(API_KEY, API_SEC, '[57x57 icon URL]'); | |
if(isset($_GET['pre'])) $b->notify(YOUR_EMAIL, 'Deployment', 'Your deployment has started'); | |
else if(isset($_GET['post'])) $b->notify(YOUR_EMAIL, 'Deployment', 'Your deployment has finished'); | |
else die(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment