Files
bootstrap/scripts/pre-commit

12 lines
367 B
Bash

#!/usr/bin/env bash
# Git pre-commit hook to automatically bump the patch version in VERSION file.
# It only increments the version if files other than VERSION are staged for commit.
set -euo pipefail
# Generate the registry dynamically and stage it
if [ -f "./scripts/generate_registry.sh" ]; then
./scripts/generate_registry.sh
git add lib/registry.sh
fi