version-hash.sh 332 B

123456789101112
  1. #!/usr/bin/env bash
  2. # Compute a deterministic content hash of all news_mcp source files.
  3. # Produces the same value the server exposes at GET /health via _VERSION_HASH.
  4. set -euo pipefail
  5. cd "$(dirname "$0")" # always run from repo root
  6. find news_mcp -name '*.py' -type f \
  7. | sort \
  8. | xargs cat \
  9. | sha256sum \
  10. | cut -c1-9