]> git.saurik.com Git - wxWidgets.git/blame - misc/scripts/svn/hooks/post-commit
Exclude zlib 3rd party sources from our checks too.
[wxWidgets.git] / misc / scripts / svn / hooks / post-commit
CommitLineData
b1b32367
RD
1#!/bin/bash
2
3REPOS="$1"
4REV="$2"
5AUTHOR=`svnlook author $REPOS -r $REV`
6REPONAME=`basename $REPOS`
7##URL="http://svn.wxwidgets.org/viewvc/$REPONAME?view=rev&rev=%s"
8URL="http://trac.wxwidgets.org/changeset/%s"
9TICKET_MAP='\[?#\s*(\d+)\]?=http://trac.wxwidgets.org/ticket/%s'
10
11EMAIL1="wx-commits-diffs@googlegroups.com"
12EMAIL2="wx-commits@googlegroups.com"
13EMAIL3="wxPython-commits@googlegroups.com"
14FROM="noreply@wxsite.net"
15REPLYTO1="wx-dev@googlegroups.com"
16REPLYTO2=$REPLYTO1
17REPLYTO3="wxPython-dev@googlegroups.com"
18
19WXPYTHON=`svnlook dirs-changed $REPOS -r $REV | grep -ce ^wxPython`
20
21if [ $WXPYTHON = 0 ]; then
22 # Send notification with diffs
23 /usr/bin/svnnotify --repos-path "$REPOS" \
24 --revision $REV \
25 --to $EMAIL1 \
26 --from $FROM \
27 --reply-to $REPLYTO1 \
28 --subject-prefix "SVN:($AUTHOR)" \
29 --revision-url $URL \
30 --ticket-map $TICKET_MAP \
31 --wrap-log \
32 --with-diff \
33 --diff-switches '--no-diff-added --no-diff-deleted' \
34 --max-diff-length 10240 \
35 --handler Alternative \
36 --alternative HTML::ColorDiff \
37 &
38
39
40
41 # Send plain text notification without diffs to a different address
42 /usr/bin/svnnotify --repos-path "$REPOS" \
43 --revision $REV \
44 --to $EMAIL2 \
45 --from $FROM \
46 --reply-to $REPLYTO2 \
47 --subject-prefix "SVN:($AUTHOR)" \
48 --revision-url $URL \
49 &
50
51else
52 # Send notification to the wxPython address
53 /usr/bin/svnnotify --repos-path "$REPOS" \
54 --revision $REV \
55 --to $EMAIL3 \
56 --from $FROM \
57 --reply-to $REPLYTO3 \
58 --subject-prefix "SVN:($AUTHOR)" \
59 --revision-url $URL \
60 --ticket-map $TICKET_MAP \
61 --wrap-log \
62 --with-diff \
63 --handler HTML::ColorDiff \
64 --diff-switches '--no-diff-added --no-diff-deleted' \
65 --max-diff-length 10240 \
66 &
67fi
68
69
7e05f038
RD
70## Send notification to cia.vc
71#$REPOS/hooks/ciabot_svn.py "$REPOS" $REV &
b1b32367
RD
72
73
74# Check for keywords that Trac can use
75export PYTHONPATH=/home/wxsite/domains/trac.wxwidgets.org/htdocs/lib/python
76export PYTHON_EGG_CACHE=/tmp/.python-eggs
77/usr/bin/python2.5 $REPOS/hooks/trac-post-commit-hook \
78 -p /home/wxsite/domains/trac.wxwidgets.org/htdocs/wxtrac -r $REV &
79
80