ente/mobile/hooks/pre-commit-fdroid
2024-03-01 12:25:37 +05:30

14 lines
468 B
Bash
Executable file

#!/bin/sh
# Get the current branch
current_branch=$(git rev-parse --abbrev-ref HEAD)
if [ "$current_branch" = "f-droid" ]; then
# Verify that the pubspec.yaml doesn't contain certain dependencies
WORDS=("in_app_purchase" "firebase")
for word in ${WORDS[@]}; do
if grep -q $word pubspec.yaml; then
echo "The pubspec.yaml file dependency on '$word', which is not allowed on the f-droid branch."
exit 1
fi
done
fi