Skip to content

Instantly share code, notes, and snippets.

@maslenkov
Last active August 29, 2015 14:15
Show Gist options
  • Save maslenkov/78c2b125c0d5d66022a1 to your computer and use it in GitHub Desktop.
Save maslenkov/78c2b125c0d5d66022a1 to your computer and use it in GitHub Desktop.
git bisect with script
#!/bin/zsh --login
cd ~/path/to/project_dir/
bundle install
bundle exec rake db:test:prepare
line=$(bundle exec rspec path/to/spec/feature_name_spec.rb | grep 1\ failure)
if [ ${line:-null} = null ]; then
exit 0
else
exit 1
fi
# into your shell:
cd ~/path/to/project_dir/
nano check.sh
chmod +x check.sh
git bisect start HEAD good_commit_hash
git bisect run ./check.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment