You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DoReports.sh 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/bin/sh
  2. # cron doesn't do this
  3. . /etc/profile
  4. . ${HOME}/.bashrc
  5. # Used for the report.log to help diagnosing problems
  6. env
  7. # Path to trunk
  8. MYDIR="/home/dmdirc/working/nightly"
  9. # Path to scripts
  10. SCRIPTDIR="/home/dmdirc/scripts"
  11. # Path to git binary
  12. GIT="/usr/bin/git"
  13. # Path to ant binary
  14. ANT="/usr/bin/ant"
  15. # Increase the memory allowed to be used when running stuff
  16. export ANT_OPTS=-Xmx512m
  17. if [ -n "${BAMBOO_INSTALL}" ]; then
  18. # Running as bamboo, symlink/create needed things to let it find the results
  19. # of the build
  20. if [ ! -e ${PWD}/reports ]; then
  21. ln -s ${MYDIR}/reports
  22. fi;
  23. if [ ! -e ${PWD}/build ]; then
  24. ln -s ${MYDIR}/build
  25. fi;
  26. fi;
  27. cd $MYDIR
  28. ${GIT} pull
  29. # Anti-Clover stupidness!
  30. rm -Rf ${MYDIR}/.clover
  31. mkdir ${MYDIR}/.clover
  32. if [ "$1" = "--all" ]; then
  33. $ANT -k clean findbugs
  34. $ANT -k domostreports
  35. elif [ "$1" = "--findbugs" ]; then
  36. $ANT -k clean findbugs
  37. else
  38. $ANT -k clean domostreports
  39. fi
  40. # Run junit issue notifier
  41. PHP=`which php`
  42. if [ -e "${SCRIPTDIR}/junit-failures.php" -a -n "${PHP}" ]; then
  43. ${PHP} -q "${SCRIPTDIR}/junit-failures.php"
  44. fi