post-commit 1.66 KB
Newer Older
1 2
#!/bin/sh

3
#shift
4
TO=dev-public@mysql.com
5
FROM=$USER@mysql.com
6
INTERNALS=internals@lists.mysql.com
7
DOCS=docs-commit@mysql.com
8
LIMIT=10000
9

10 11 12 13 14 15 16
if [ "$REAL_EMAIL" = "" ]
then
 echo "Warning: you must set REAL_EMAIL in your profile"
else
 FROM=$REAL_EMAIL 
fi

17 18
BK_STATUS=$BK_STATUS$BK_COMMIT

19
if [ "$BK_STATUS" = OK ]
20
then 
21 22
 CHANGESET=`bk -R prs -r+ -h -d':I:' ChangeSet`

23 24 25
 echo "Commit successful, notifying developers at $TO"
 (
   cat <<EOF
26
List-ID: <bk.mysql>
27 28
From: $FROM
To: $TO
29
Subject: bk commit into 3.23 tree ($CHANGESET)
30 31 32 33 34 35 36 37 38 39 40

EOF
  bk changes -v -r+
  bk cset -r+ -d
 ) | head -n $LIMIT | /usr/sbin/sendmail -t
 echo "Notifying internals list at $INTERNALS"
 (
   cat <<EOF
List-ID: <bk.mysql>
From: $FROM
To: $INTERNALS
41
Subject: bk commit into 3.23 tree ($CHANGESET)
42

43 44 45 46 47 48
Below is the list of changes that have just been committed into a local
3.23 repository of $USER. When $USER does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
49 50 51

EOF
  bk changes -v -r+
52
  bk cset -r+ -d
53
 ) | head -n $LIMIT | /usr/sbin/sendmail -t
54 55 56 57 58 59 60 61 62 63 64 65 66 67

#++
# docs-commit@ mail
# Picks up anything under the Docs subdirectory (relevant for docs team).
#--
 bk changes -v -r+ | grep -q "  Docs/"
 if [ $? -eq 0 ]
 then
  echo "Notifying docs list at $DOCS"
  (
    cat <<EOF
List-ID: <bk.mysql-3.23>
From: $FROM
To: $DOCS
68
Subject: bk commit - 3.23 tree (Manual) ($CHANGESET)
69 70 71 72 73 74 75

EOF
  bk changes -v -r+
  bk cset -r+ -d
 ) | head -n $LIMIT | /usr/sbin/sendmail -t
 fi

76
else
77
 echo "commit failed because '$BK_STATUS', you may need to re-clone..." 
78
fi