Skip to content

Commit 878a362

Browse files
committed
FIX pre-commit hook
We can not run bash_unit test with an old version of bash_unit as they will never pass when we introduce a new feature. We're just keeping it here as a comment to document how one can use it.
1 parent 980315c commit 878a362

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

.github/workflows/pre-commit.yml

-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ jobs:
3434
pre-commit gc
3535
# Run default pre-commit hooks
3636
pre-commit run --show-diff-on-failure --color=always --all-files | tee ${RAW_LOG}
37-
# Run manual pre-commit hook that runs bash_unit@rev
38-
# defined in .pre-commit-config.yaml
39-
pre-commit run bash-unit --hook-stage manual -a | tee -a ${RAW_LOG}
4037
# Run this version of bash_unit using it's current pre-commit-hook.yaml config
4138
# Useful for testing that the current version works
4239
pre-commit try-repo . --verbose --all-files | tee -a ${RAW_LOG}

.pre-commit-config.yaml

+13-7
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,16 @@ repos:
8484
entry: bash -c "./bash_unit tests/*"
8585
pass_filenames: false
8686

87-
- repo: https://github.com/pgrange/bash_unit
88-
rev: 308c139639269b89c26911098b7739ee2400fcbd
89-
hooks:
90-
- id: bash-unit
91-
stages: [manual]
92-
always_run: true
93-
verbose: true
87+
# This is how one can use bash_unit with pre-commit
88+
# Only for documentation purpose as it can't be
89+
# used in bash_unit itself: we always want to test
90+
# bash_unit with the last version of bash_unit.
91+
# Otherwise tests would always fail when we introduce
92+
# a new feature.
93+
# - repo: https://github.com/pgrange/bash_unit
94+
# rev: v2.2.0
95+
# hooks:
96+
# - id: bash-unit
97+
# stages: [manual]
98+
# always_run: true
99+
# verbose: true

0 commit comments

Comments
 (0)