Skip to content

Instantly share code, notes, and snippets.

@cevatkerim
Forked from hcurotta/post-merge
Created June 26, 2016 17:13
Show Gist options
  • Save cevatkerim/0b0d28021a002b2f22f25099d446d1c1 to your computer and use it in GitHub Desktop.
Save cevatkerim/0b0d28021a002b2f22f25099d446d1c1 to your computer and use it in GitHub Desktop.
Post Merge git hook to trigger codeship deployment when using BitBucket
#!/bin/bash
branch_name=$(git symbolic-ref --short HEAD)
if [ "$branch_name" == 'dev' ] || [ "$branch_name" == 'staging' ]
then
git commit --allow-empty -m 'empty commit to trigger deployment'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment