File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 2121 with :
2222 enable-cache : true
2323
24- - name : Install justfile and zsh
25- run : sudo apt install -y just zsh
24+ - name : Install justfile
25+ run : sudo apt install -y just
2626
2727 - name : Set Git user
2828 run : |
Original file line number Diff line number Diff line change @@ -15,14 +15,15 @@ install-precommit:
1515
1616# Check the commit messages on the current branch that are not on the main branch
1717check-commits :
18- #!/ bin/ zsh
18+ #!/usr/ bin/env bash
1919 branch_name=$(git rev-parse --abbrev-ref HEAD)
2020 number_of_commits=$(git rev-list --count HEAD ^main)
2121 if [[ ${branch_name} != " main" && ${number_of_commits} -gt 0 ]]
2222 then
23+ # If issue happens, try `uv tool update-shell`
2324 uvx --from commitizen cz check --rev-range main..HEAD
2425 else
25- echo " On ` main` or current branch doesn't have any commits."
26+ echo " On ' main' or current branch doesn't have any commits."
2627 fi
2728
2829# Check for spelling errors in files
@@ -31,7 +32,7 @@ check-spelling:
3132
3233# Test and check that a data package can be created from the template
3334test :
34- #!/ bin/ zsh
35+ #!/usr/ bin/env bash
3536 test_name=" test-data-package"
3637 test_dir=" $(pwd)/_temp/$test_name"
3738 template_dir=" $(pwd)"
8889
8990# Clean up any leftover and temporary build files
9091cleanup :
91- #!/ bin/ zsh
9292 rm -rf _temp
9393
9494# Build the website using Quarto
Original file line number Diff line number Diff line change @@ -30,16 +30,17 @@ format-python:
3030 uv run ruff check --fix .
3131 uv run ruff format .
3232
33- # Run checks on commits with non- main branches
33+ # Check the commit messages on the current branch that are not on the main branch
3434check-commits :
35- #!/ bin/ zsh
35+ #!/usr/ bin/env bash
3636 branch_name=$(git rev-parse --abbrev-ref HEAD)
37- number_of_commits=$(git rev-list --count HEAD ^$branch_name )
37+ number_of_commits=$(git rev-list --count HEAD ^main )
3838 if [[ ${branch_name} != " main" && ${number_of_commits} -gt 0 ]]
3939 then
40- uv run cz check --rev-range main..HEAD
40+ # If issue happens, try `uv tool update-shell`
41+ uvx --from commitizen cz check --rev-range main..HEAD
4142 else
42- echo " Not on main or haven 't committed yet ."
43+ echo " On ' main' or current branch doesn 't have any commits ."
4344 fi
4445
4546# Check for spelling errors in files
You can’t perform that action at this time.
0 commit comments