#!/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
