#!/bin/bash
# Check if pdm.lock is in sync with pyproject.toml

set -e

echo "Checking pdm.lock is up-to-date..."

if ! pdm lock --check 2>/dev/null; then
    echo ""
    echo "ERROR: pdm.lock is out of sync with pyproject.toml!"
    echo ""
    echo "Run this to fix:"
    echo "    pdm lock"
    echo "    git add pdm.lock"
    echo ""
    exit 1
fi

echo "pdm.lock is up-to-date."
