Created
March 8, 2011 20:40
-
-
Save gmgent/860995 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
desc 'Checkins.' | |
task :ci do | |
comment = "" | |
while comment.blank? | |
$stdout.write "comment: " | |
comment = $stdin.gets | |
end | |
puts "Running tests..." | |
`rake test` | |
if $? != 0 | |
puts "Tests failed." | |
#rerun test within system command to output meaningful err message | |
system("rake test") | |
exit(1) | |
else | |
puts "you may check in." | |
system("git commit -m '#{comment}'") | |
system("git push origin master") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment