0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 03:52:15 +02:00

Add script to test all commits in a branch

It skips lint-rules:test, as it still doesn't seem to work for me.
This commit is contained in:
Damien Elmes 2022-07-28 15:23:04 +10:00 committed by Mike Hardy
parent 60b1ac3aed
commit deb3a539ec

19
tools/test-commits.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# Walk backwards from HEAD, testing each commit until the
# provided first commit (inclusive).
set -e
if [ "$1" = "" ]; then
echo "usage: test-commits.sh [first-commit-hash]"
exit 1
fi
first_commit="$1"
while :; do
echo "testing $(git log --pretty=oneline -1)"
./gradlew -q clean uninstallPlayDebug jacocoTestReport :api:lintRelease :AnkiDroid:lintPlayRelease ktlintCheck
[ $(git rev-parse HEAD) = $first_commit ] && break
git checkout HEAD^
done