Files
spotify-quickauth/.hooks/pre-commit.sh
2024-10-07 14:42:50 -05:00

10 lines
329 B
Bash
Executable File
Vendored

#!/bin/sh
# TODO: Only run when README.md is modified
# TODO: Support partial staging, where the 'Staged' version is copied to CARGO_README.md, and then `sed` is ran.
# Remove markdown extension lines for Cargo publishing
sed '/^>\[!/d' README.md > CARGO_README.md
# Add the modified file to the commit
git add CARGO_README.md