aboutsummaryrefslogtreecommitdiff
path: root/bin/hook/post-receive
blob: a3067b89ec3ea8a4e627e817142377d1325145f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

#
# Example post-receive hook for server-side git repository.
#
# Note: you'll need to populate HOOK_URL and HOOK_HMAC_KEY
#

# set sane error mode
set -eu

# set env vars
export HOOK_URL='https://example.com/hooks/deploy'
export HOOK_HMAC_KEY="omitted" 

# trigger webhook request
exec /data/www/example.com/git/bin/hook/fire.rb