Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# 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 #{}")
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 = == project.last_build.commit.identifier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment