Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

DoReports.sh 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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/google"
  9. # Path to scripts
  10. SCRIPTDIR="/home/dmdirc/scripts"
  11. # Path to ant binary
  12. ANT="/usr/bin/ant"
  13. # Path to svn binary
  14. SVN="/usr/bin/svn"
  15. # Increase the memory allowed to be used when running stuff
  16. export ANT_OPTS=-Xmx256m
  17. #/bin/sh $MYDIR/oblong.sh "Reports" "Style Report Generation Started";
  18. cd $MYDIR
  19. $SVN update
  20. $ANT clean
  21. if [ "$1" = "--all" ]; then
  22. $ANT -k -buildfile $MYDIR/doreports.xml doallreports
  23. elif [ "$1" = "--findbugs" ]; then
  24. $ANT -k -buildfile $MYDIR/style_build.xml findbugs
  25. else
  26. $ANT -k -buildfile $MYDIR/doreports.xml domostreports
  27. fi
  28. # Run junit issue notifier
  29. PHP=`which php`
  30. if [ -e "$SCRIPTDIR/junit-failures.php" -a "${PHP}" != "" ]; then
  31. $PHP -q $SCRIPTDIR/junit-failures.php
  32. fi
  33. # Oblong junit announcement
  34. LINE=`cat junitreports/overview-summary.html | grep "%</td"`
  35. PASSRATE=`expr "$LINE" : '.*<td>\(.*\)%</td>'`
  36. if [ "${PASSRATE}" = "" ]; then
  37. /bin/sh $MYDIR/oblong.sh "Reports" "Report Generation Complete (Junit tests failed to run)"
  38. else
  39. /bin/sh $MYDIR/oblong.sh "Reports" "Report Generation Complete (Junit Pass Rate: ${PASSRATE}%)"
  40. fi