Skip to content

Instantly share code, notes, and snippets.

@AshCoolman
Last active February 28, 2018 14:01
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 AshCoolman/27127cdb612fd2d4cc0dc465e76f5e04 to your computer and use it in GitHub Desktop.
Save AshCoolman/27127cdb612fd2d4cc0dc465e76f5e04 to your computer and use it in GitHub Desktop.
When did the build break?
#!/usr/bin/env bash
# https://lwn.net/Articles/317154/
# USAGE:
# 1. Place this file one level above the project folder
# 2. git bisect start <badSHA> <goodSHA>
# 3. chmod +x ../auto-bisect.sh
# 4. git bisect run ../auto-bisect.sh
rm -r .out
yarn;
yarn storybook:static;
pwd
if [ ! -f "$(pwd)/.out/index.html" ]; then
echo "File not found!"
git reset --hard
git clean -df
exit 1
else
echo "File found."
git reset --hard
git clean -df
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment