Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 66 lines (48 sloc) 1.102 kb
2dfc659 @rwmjones Add autobuild script.
rwmjones authored
1 #!/bin/bash -
2
3 PROJECT=febootstrap
4 MAILTO=libguestfs@redhat.com
75c179d @rwmjones autobuild: Factor out HOSTNAME variable.
rwmjones authored
5 HOSTNAME="$(hostname -s)"
2dfc659 @rwmjones Add autobuild script.
rwmjones authored
6
7 #----------------------------------------------------------------------
8 # Helper functions.
9
10 failed ()
11 {
75c179d @rwmjones autobuild: Factor out HOSTNAME variable.
rwmjones authored
12 mail -s "$HOSTNAME $PROJECT FAILED $1 $gitsha" $MAILTO < local-log
2dfc659 @rwmjones Add autobuild script.
rwmjones authored
13 }
14
15 ok ()
16 {
75c179d @rwmjones autobuild: Factor out HOSTNAME variable.
rwmjones authored
17 mail -s "$HOSTNAME $PROJECT success $gitsha" $MAILTO < local-log
2dfc659 @rwmjones Add autobuild script.
rwmjones authored
18 }
19
20 #----------------------------------------------------------------------
21
22 set -e
23 set -x
24
25 rm -f local-log
26 cat > local-log <<EOF
27
28 This is an automatic message generated by the builder on
75c179d @rwmjones autobuild: Factor out HOSTNAME variable.
rwmjones authored
29 $HOSTNAME for $PROJECT. Log files from the build
2dfc659 @rwmjones Add autobuild script.
rwmjones authored
30 follow below.
31
32 $(uname -a)
33 $(date)
34
35 -----
36
37 EOF
38 exec >> local-log 2>&1
39
40 # Pull from the public repo so that we don't need ssh-agent.
41 git pull --rebase git://git.annexia.org/git/febootstrap.git master
42 git clean -d -f
43
44 # The git version we are building.
45 gitsha=$(git log|head -1|awk '{print $2}')
46
47 # Do the configure step.
48 ./autogen.sh || {
49 failed "configure step"
50 exit 1
51 }
52
53 # Do the build step.
54 make || {
55 failed "build step"
56 exit 1
57 }
58
59 # Run the tests.
60 make check || {
61 failed "tests"
62 exit 1
63 }
64
65 ok
Something went wrong with that request. Please try again.