#!/bin/bash
last_commit=$(git log -1 --pretty=format:"%H")
signature=$(git verify-commit "$last_commit" 2>&1)

if echo "$signature" | grep -q "Good signature"; then
    echo "Commit $last_commit successfully signed ✓"
else
    echo "Warning: Last commit was not properly signed"
    echo "$signature"
fi
