Last active
June 24, 2020 23:06
-
-
Save justanotherdot/d587f5bea0f6937ef7f7bda53f23ac56 to your computer and use it in GitHub Desktop.
Only run bisect tests on GitHub flavored merge quests.
This file contains 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
#!/bin/sh -eu | |
FROM_COMMIT="$1" | |
TO_COMMIT="$2" | |
git bisect start "$FROM_COMMIT" "$TO_COMMIT" | |
git bisect run ./bisect-test && git bisect reset |
This file contains 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
#!/bin/sh -eu | |
MERGE_COMMITS=$(git log --pretty="format:%H %s" | grep 'Merge pull request' | awk '{print $1}' | xargs) | |
CURRENT_COMMIT="$(git rev-parse HEAD)" | |
[ ! echo "$MERGE_COMMITS" | grep "$CURRENT_COMMIT" ] && exit 125 | |
./test || exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment