0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-19 19:42:17 +02:00
Anki-Android/tools/test-commits.sh
Damien Elmes 7a104b2d7b
Run jacoco separately from lint to work around errors (#14052)
* Run jacoco separately to work around errors; use debug variant only

https://github.com/ankidroid/Anki-Android/issues/14048#issuecomment-1613923181

* Switch back to release
2023-06-29 21:44:38 -05:00

22 lines
525 B
Bash
Executable File

#!/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
./gradlew -q :api:lintRelease :AnkiDroid:lintPlayRelease ktlintCheck
./gradlew --stop
[ $(git rev-parse HEAD) = $first_commit ] && break
git checkout HEAD^
done