fdroiddata/hooks/pre-commit
Daniel Martí a07f1af706 pre-commit: do nothing if no apps are changed
Otherwise, we'd run lint on every single app.
2016-06-20 11:18:31 +01:00

15 lines
248 B
Bash
Executable file

#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
# Redirect output to stderr.
exec 1>&2
apps="$(git diff --cached --name-only --diff-filter=ACM | sed -n 's@metadata/\(.*\).txt@\1@p')"
if [[ -n "$apps" ]]; then
fdroid lint -f $apps
fi