README.md in travis_parallel_sentinel-0.1.4 vs README.md in travis_parallel_sentinel-0.1.5

- old
+ new

@@ -1,11 +1,37 @@ # TravisParallelSentinel -Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/travis_parallel_sentinel`. To experiment with that code, run `bin/console` for an interactive prompt. +Simple parallel build coordination for Travis. -TODO: Delete this and the text above, and describe your gem +Until https://github.com/travis-ci/travis-ci/issues/929 is resolved, you can use this to coordinate your builds. Install +the gem, and you can do the following in your build scripts: + STATUS=$(travis_parallel_sentinel) + case $STATUS in + ok) + echo 'All clear' + exit 0 + ;; + deploy) + echo 'All builds green' + ;; + *) + echo "Unexpected build status $STATUS" + exit 1 + ;; + esac + + # do your deploy work here + +The bundled script will return `ok` for anything but the primary build; for the primary build, it will error out if any +of the other builds have, and will return `deploy` if all went well. This is meant to run *as part of your tests*, as +that will cause your build to error out if the deploy fails. + +If you want to have the standard Travis behavior, that is, have builds go green even if the deploy step fails, run the +above in your after\_X step, but do `STATUS=$(travis_parallel_sentinel include)` to include the primary build status in +the success assessment. + ## Installation Add this line to your application's Gemfile: ```ruby @@ -18,22 +44,5 @@ Or install it yourself as: $ gem install travis_parallel_sentinel -## Usage - -TODO: Write usage instructions here - -## Development - -After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment. - -To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). - -## Contributing - -1. Fork it ( https://github.com/[my-github-username]/travis_parallel_sentinel/fork ) -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Add some feature'`) -4. Push to the branch (`git push origin my-new-feature`) -5. Create a new Pull Request