Skip to content

Commit bedaf75

Browse files
chore(sync): 🔨 synced file(s) with seedcase-project/seedcase-theme
1 parent dc27eeb commit bedaf75

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

justfile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,24 @@
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
66

77
# Check spelling
88
check-spelling:
99
uvx typos
1010

11+
# Run checks on commits with non-main branches
12+
check-commits:
13+
#!/bin/zsh
14+
branch_name=$(git rev-parse --abbrev-ref HEAD)
15+
number_of_commits=$(git rev-list --count HEAD ^main)
16+
if [[ ${branch_name} != "main" && ${number_of_commits} -gt 0 ]]
17+
then
18+
uvx cz check --rev-range main..HEAD
19+
else
20+
echo "Can't either be on ${branch_name} or have more than ${number_of_commits}."
21+
fi
22+
1123
# Build the website using Quarto
1224
build-website:
1325
quarto render

0 commit comments

Comments
 (0)