#!/bin/bash
echo "Checking GPG signature..."

# Check if a GPG key is configured
if ! git config --get user.signingkey > /dev/null; then
    echo "Error: No GPG key configured"
    echo "Configure your key with: git config --global user.signingkey YOUR_KEY"
    exit 1
fi

# Check if GPG agent is running
if ! gpg-connect-agent /bye > /dev/null 2>&1; then
    echo "Error: GPG agent is not running"
    exit 1
fi

echo "GPG signature validated ✓"
exit 0
