2022-07-28 07:23:04 +02:00
|
|
|
#!/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)"
|
2023-06-30 04:44:38 +02:00
|
|
|
./gradlew -q clean uninstallPlayDebug jacocoTestReport
|
|
|
|
./gradlew -q :api:lintRelease :AnkiDroid:lintPlayRelease ktlintCheck
|
2022-10-13 21:32:39 +02:00
|
|
|
./gradlew --stop
|
2022-07-28 07:23:04 +02:00
|
|
|
[ $(git rev-parse HEAD) = $first_commit ] && break
|
|
|
|
git checkout HEAD^
|
|
|
|
done
|