gfan | c351bd0 | 2018-06-11 11:25:36 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | set +e |
| 3 | |
| 4 | MISC_STATUS=0 |
| 5 | |
| 6 | # check that all targetSdkVersion are 26+ |
| 7 | # test "$(grep -H targetSdkVersion */app/build.gradle | tee /dev/stderr | cut -d= -f 2 | xargs -n1 echo | sort | uniq | wc -l)" = "2" |
| 8 | # check that there is no tabs in AndroidManifest |
| 9 | (! grep -n $'\t' */*/src/main/AndroidManifest.xml) | cat -t; |
| 10 | MISC_STATUS=$(($MISC_STATUS + ${PIPESTATUS[0]})) |
| 11 | |
| 12 | # check that there is no trailing spaces in AndroidManifest |
| 13 | (! grep -E '\s+$' */*/src/main/AndroidManifest.xml) | cat -e; |
| 14 | MISC_STATUS=$(($MISC_STATUS + ${PIPESTATUS[0]})) |
| 15 | |
| 16 | # populate the error to final status |
| 17 | if [[ "$MISC_STATUS" -ne 0 ]]; then |
| 18 | SAMPLE_CI_RESULT=$(($SAMPLE_CI_RESULT + 1)) |
| 19 | fi |