ente/mobile/hooks/pre-commit-fdroid

15 lines
468 B
Plaintext
Raw Normal View History

2023-06-16 07:01:37 +00:00
#!/bin/sh
# Get the current branch
current_branch=$(git rev-parse --abbrev-ref HEAD)
if [ "$current_branch" = "f-droid" ]; then
2023-06-16 07:03:02 +00:00
# Verify that the pubspec.yaml doesn't contain certain dependencies
2023-06-16 07:01:37 +00:00
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