Skip to content

Commit 5a05048

Browse files
authored
refactor: ♻️ use bash for check-commits justfile recipe (#150)
# Description Moved this from #134. No review needed.
1 parent 410c9bc commit 5a05048

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

template/justfile.jinja

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,17 @@ build-website:
6363
uv run quartodoc build
6464
uv run quarto render --execute
6565

66-
# Run checks on commits with non-main branches
66+
# Check the commit messages on the current branch that are not on the main branch
6767
check-commits:
68-
#!/bin/zsh
68+
#!/usr/bin/env bash
6969
branch_name=$(git rev-parse --abbrev-ref HEAD)
7070
number_of_commits=$(git rev-list --count HEAD ^main)
7171
if [[ ${branch_name} != "main" && ${number_of_commits} -gt 0 ]]
7272
then
73-
uv run cz check --rev-range main..HEAD
73+
# If issue happens, try `uv tool update-shell`
74+
uvx --from commitizen cz check --rev-range main..HEAD
7475
else
75-
echo "Can't either be on ${branch_name} or have more than ${number_of_commits}."
76+
echo "On 'main' or current branch doesn't have any commits."
7677
fi
7778

7879
# Run basic security checks on the package

0 commit comments

Comments
 (0)