apenwarr / gitbuilder

Auto-builds and tests all the branches of your git projects, showing pass/fail results on a web page/RSS feed. Isolates failures to the first commit that caused the problem.

This URL has Read+Write access

gitbuilder / changelog-email
100755 33 lines (25 sloc) 0.617 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
DIR=$(dirname $0)
cd "$DIR" || exit 5
 
 
EMAIL=$(git var GIT_AUTHOR_IDENT | sed 's/^.*<\(.*\)>.*$/\1/')
if [ -r out/changelog-email-from ]; then
EMAIL=$(cat out/changelog-email-from)
fi
 
PROJ=Git
if [ -r out/project-name ]; then
PROJ=$(cat out/project-name)
fi
 
DATE=$(date +%Y-%m-%d)
 
cat <<-EOF
From: ChangeLog Script <$EMAIL>
To: (undisclosed recipients);
Subject: Changes in $PROJ for $DATE
MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
Precedence: bulk
Importance: low
X-This-Is-Git-Changelog: yes
List-id: <git-changelog-script>
 
EOF
 
cd out || exit 6
exec ./changelog.pl "$@"