Code

Code

post-commit for git


#!/bin/sh

REPOS="$1"
REV="$2"

#mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf
MESSAGE=$(svnlook propget --revprop -r $REV $REPOS svn:log)

cat <<EOF | /root/monitor/sendmail.py -s "[COMMIT] $REPOS:$REV" -r user@domain
REPOS: $REPOS
REV: $REV
MESSAGE:
$MESSAGE
EOF