Last active
February 28, 2018 14:01
-
-
Save AshCoolman/27127cdb612fd2d4cc0dc465e76f5e04 to your computer and use it in GitHub Desktop.
When did the build break?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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