post-merge 1 KB
Newer Older
Fardale's avatar
Fardale committed
1 2 3 4 5 6 7 8
#!/bin/sh

# Basic verification. No compilation error
make clean

if  ! make; then
   echo 'Compilation error in the master branch.' > CI/msg
   echo 'Result of make :\n' >> CI/msg
9 10
   make 2>> CI/msgerror
   cat CI/msgerror >> CI/msg
Fardale's avatar
Fardale committed
11 12
   echo '\n-- \nCI script' >> CI/msg
   # Kludge : pas de serveur smtp accessible depuis la salle.
13 14
   scp CI/msg fardale@crash-test.crans.org:the_dungeon_project/
   ssh fardale@crash-test.crans.org './the_dungeon_project/mailci.py "ens-info-genielog-2015@lists.crans.org" ./the_dungeon_project/msg'
Fardale's avatar
Fardale committed
15
   rm -f CI/msg
16 17 18 19 20 21 22
   echo 'It seems that your commit breaks the compilation of the project.' > CI/msg
   echo 'Result of make :\n' >> CI/msg
   cat CI/msgerror >> CI/msg
   echo '\n-- \nCI script' >> CI/msg
   # Kludge : pas de serveur smtp accessible depuis la salle.
   scp CI/msg fardale@crash-test.crans.org:the_dungeon_project/
   ssh fardale@crash-test.crans.org "./the_dungeon_project/mailci.py $(git log -n 1 | grep Author | sed "s/.*<\(.*\)>/\1/g") ./the_dungeon_project/msg"
Fardale's avatar
Fardale committed
23 24 25
fi

exit 0