4 ms·
I've had to git bisect a react native app in a monorepo before. Took me nearly a day to track down the commit, due to the size of node_modules and the need to d
by phist_mcgee 5y ago
I've had to git bisect a react native app in a monorepo before. Took me nearly a day to track down the commit, due to the size of node_modules and the need to do a `pod install` every time.
- Izkata 5y ago> and the need to do a `pod install` every time. Phrasing makes it sound like you were doing it manually, so if you didn't know, you can just drop a script in the directory, say, "check.sh": #!/bin/bash if ! pod install; then exit 125 fi do-the-actual-test make it executable, and: git bisect run ./check.sh The special exit code 125 tells bisect "this revision can't be tested, skip it", otherwise it just uses exit code 0 for "good" and 1-127 (except for 125) for "bad".
- phist_mcgee 5y agoThanks so much for posting this :D It did require manual user interaction, so I had to interact with the app for quite a while in between bisect checkouts, the waiting for the installs was more the worse part over the actual tedium of running commands.
- Izkata 5y agoSince we're in a "bash patterns" thread anyway... the script it's running can do whatever, so let's extend it so it works in your case too, by asking you if it's good or not, so you can still do manual app interaction with "bisect run": #!/bin/bash if ! pod install; then exit 125 fi Q= while [[ "$Q" != 'y' && "$Q" != 'n' ]]; do read -p 'Is this revision good? [y/n] ' Q done [[ "$Q" == 'y' ]]