Guest User

Untitled

a guest
Apr 26th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. # Works with Integrity version's >= 0.2.0 and < 0.2.9
  2.  
  3. desc "Will build the latest commit for any git project that has already been built and the latest commit has not already been built"
  4. task :build_new_commits do
  5. require "init"
  6. Integrity.log("Checking for new commits at #{Time.now}")
  7. Integrity::Project.all.each do |project|
  8. # Don't build if project is just being set up, or a build of 'HEAD' is already outstanding or the latest commit has already
  9. # been built.
  10. unless project.blank? ||
  11. project.last_build.commit.identifier == 'HEAD' ||
  12. (head = Bob::Builder.new(project).send(:scm).head) == project.last_build.commit.identifier
  13. project.build(head)
  14. end
  15. end
  16. end
Add Comment
Please, Sign In to add comment