Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Works with Integrity version's >= 0.2.0 and < 0.2.9
- desc "Will build the latest commit for any git project that has already been built and the latest commit has not already been built"
- task :build_new_commits do
- require "init"
- Integrity.log("Checking for new commits at #{Time.now}")
- Integrity::Project.all.each do |project|
- # Don't build if project is just being set up, or a build of 'HEAD' is already outstanding or the latest commit has already
- # been built.
- unless project.blank? ||
- project.last_build.commit.identifier == 'HEAD' ||
- (head = Bob::Builder.new(project).send(:scm).head) == project.last_build.commit.identifier
- project.build(head)
- end
- end
- end
Add Comment
Please, Sign In to add comment