run.sh 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. # This file is part of Tabannusi, a continuous build system.
  2. # Copyright (c) 2016 ali abdul ghani <alimiracle@riseup.net>
  3. # Tabannusi is free software: you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 3 of the License, or
  6. # (at your option) any later version.
  7. # Tabannusi is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with Tabannusi. If not, see <http://www.gnu.org/licenses/>.
  13. source /etc/tabannusi/config.sh
  14. cd $repository
  15. log1=`git log -1 --pretty=%B`
  16. log2=`cat $temp/q.txt`
  17. log1_copy=$log1
  18. if [ "$log1" = "$log2" ]
  19. then
  20. q=1
  21. else
  22. echo $log1 >$temp/q.txt
  23. remove_char="_"
  24. log1=${log1//" "/$remove_char}
  25. cp -R $repository $build_path/$log1
  26. cd $build_path/$log1
  27. /etc/tabannusi/build.sh &>$temp/$log1
  28. echo "this build log for "$log1_copy|mutt -a $temp/$log1 -s "build log" -- $email
  29. rm $temp/$log1
  30. fi