Skip to content

Instantly share code, notes, and snippets.

@radamant
Created August 10, 2010 23:03
Show Gist options
  • Select an option

  • Save radamant/518176 to your computer and use it in GitHub Desktop.

Select an option

Save radamant/518176 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
def run(cmd)
puts ">> #{cmd}"
puts `#{cmd}`
end
branch = ARGV[0]
remote = branch.split("/")[0]
name = branch.split("/")[1]
puts "Integrating #{name} from #{remote}"
run("git fetch #{remote}")
run("git co master")
run("git reset --hard origin/master")
result = run("git merge --no-ff #{branch}")
if(result =~ /conflict/i)
puts "*" * 80
puts "CONFLICTS FOUND DO NOT INTEGRATE"
puts "*" * 80
exit 1
end
run("rake spec && rm rerun.txt ; rake cucumber")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment