diff --git a/template/justfile.jinja b/template/justfile.jinja index ab72553..8e45742 100644 --- a/template/justfile.jinja +++ b/template/justfile.jinja @@ -63,16 +63,17 @@ build-website: uv run quartodoc build uv run quarto render --execute -# Run checks on commits with non-main branches +# Check the commit messages on the current branch that are not on the main branch check-commits: - #!/bin/zsh + #!/usr/bin/env bash branch_name=$(git rev-parse --abbrev-ref HEAD) number_of_commits=$(git rev-list --count HEAD ^main) if [[ ${branch_name} != "main" && ${number_of_commits} -gt 0 ]] then - uv run cz check --rev-range main..HEAD + # If issue happens, try `uv tool update-shell` + uvx --from commitizen cz check --rev-range main..HEAD else - echo "Can't either be on ${branch_name} or have more than ${number_of_commits}." + echo "On 'main' or current branch doesn't have any commits." fi # Run basic security checks on the package