Created
December 21, 2009 15:53
-
-
Save mocoso/261005 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment