Skip to content

Commit d86cebe

Browse files
authored
refactor: 👷 use bash instead of zsh (#150)
1 parent be57fd9 commit d86cebe

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
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: |

justfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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
1717
check-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
3334
test:
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)"
@@ -88,7 +89,6 @@ test:
8889

8990
# Clean up any leftover and temporary build files
9091
cleanup:
91-
#!/bin/zsh
9292
rm -rf _temp
9393

9494
# Build the website using Quarto

template/justfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff 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
3434
check-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

0 commit comments

Comments
 (0)