Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glennr/454892807636aee8610848a44f657c16 to your computer and use it in GitHub Desktop.
Save glennr/454892807636aee8610848a44f657c16 to your computer and use it in GitHub Desktop.
# runner.sh
#
# Runs a git bisect using spec/el_bisector_spec.rb inside the 'app' docker container
#
# Usage
#
# Pop your desired spec file in spec/el_bisector_spec.rb. Then use this script as the input to `git bisect run`
#
#
# git bisect start ; git bisect good 0ee17c61406728b2c7866c9cbc407d24600affb5 ; git bisect bad ; git bisect run ./runner.sh; git bisect reset;
#
DIR=`pwd`
cd ..
# call docker compose directly, wrapping the desired commaind in a bash -c because https://github.com/docker/compose/issues/3379
OUTPUT=`docker-compose exec app bash -c 'bundle exec rspec spec/el_bisector_spec.rb'`
STATUS=$?
echo "Runner $OUTPUT"
echo "Exit status $STATUS"
cd $DIR
exit $STATUS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment