Check build status of a project on the command line
$ curl -sL \ gist.github.com/raw/1676577/71c1971fa1ee4facb0e323e31169a790c9b50d5b/travis.rb \ > ~/bin/travis && chmod +x ~/bin/travis
You're in a project's directory. Is the current branch green on Travis CI? Let's find out:
$ travis origin/master built OK.
To check a branch other than current:
$ travis feature origin/feature built OK.
travis command will exit with a non-zero status if the latest build has failed or is still running. This enables you to chain the command like this:
$ travis && rake release
Now if the build has failed,
rake release will never happen and this gives you the chance to fix your library before releasing the gem.