File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 22 just --list --unsorted
33
44# Run all necessary build commands.
5- run-all : check-spelling build-website
5+ run-all : check-spelling check-commits build-website
6+
7+ # Install the pre-commit hooks
8+ install-precommit :
9+ # Install pre-commit hooks
10+ uvx pre-commit install
11+ # Run pre-commit hooks on all files
12+ uvx pre-commit run --all-files
13+ # Update versions of pre-commit hooks
14+ uvx pre-commit autoupdate
615
716# Check spelling
817check-spelling :
918 uvx typos
1019
20+ # Run checks on commits with non-main branches
21+ check-commits :
22+ #!/ bin/ zsh
23+ branch_name=$(git rev-parse --abbrev-ref HEAD)
24+ number_of_commits=$(git rev-list --count HEAD ^main)
25+ if [[ ${branch_name} != " main" && ${number_of_commits} -gt 0 ]]
26+ then
27+ uvx cz check --rev-range main..HEAD
28+ else
29+ echo " Can't either be on ${branch_name} or have more than ${number_of_commits}."
30+ fi
31+
1132# Build the website using Quarto
1233build-website :
1334 quarto render
You can’t perform that action at this time.
0 commit comments