Skip to content

Instantly share code, notes, and snippets.

View KevinBrogan's full-sized avatar

Kevin Brogan KevinBrogan

  • British Columbia
View GitHub Profile
@KevinBrogan
KevinBrogan / deploy.php
Created March 2, 2018 17:13
bitbucket webhook deployment script
<?php
$payload = json_decode(file_get_contents('php://input'));
if(!$payload)
{
http_response_code(404);
exit();
}
$branch = trim(`git branch | grep "\* \K.*$" -oP`);