pre-push-recommended.sh (990B)
1 #!/bin/sh 2 3 # We recommend you run this as a pre-push hook: to reduce 4 # review turn-around time, we want all pushes to run tasks 5 # locally. Using this hook will guarantee your hook gets 6 # updated as the repository changes. 7 # 8 # This hook tries to run as much as possible without taking 9 # too long. 10 # 11 # You can use it by running this command from the project root: 12 # `ln -s ../../config/pre-push-recommended.sh .git/hooks/pre-push` 13 14 set -e 15 16 # Run linter in tools/ if it's installed. 17 if `which pycodestyle > /dev/null`; then 18 pycodestyle tools 19 fi 20 21 # Run core checks. Descriptions for each gradle task 22 # below can be found in the output of `./gradlew tasks`. 23 # 24 # Tasks omitted because they take a long time to run: 25 # - assembling all variants 26 # - unit test on all variants 27 # - UI tests 28 # - android lint (takes a long time to run) 29 ./gradlew -q \ 30 ktlint \ 31 detekt \ 32 assembleDebug \ 33 assembleDebugAndroidTest \ 34 mozilla-detekt-rules:test \ 35 testDebug