just: Add post-checkout hook
This commit is contained in:
parent
09cd3eeb82
commit
4e0f739c29
2
justfile
2
justfile
|
|
@ -11,7 +11,9 @@ CHECK := "🔄 " + BOLD
|
||||||
default: check-hooks
|
default: check-hooks
|
||||||
@just --list
|
@just --list
|
||||||
|
|
||||||
|
# Run post-checkout checks
|
||||||
[group('hooks')]
|
[group('hooks')]
|
||||||
|
post-checkout:
|
||||||
|
|
||||||
# Run pre-commit checks
|
# Run pre-commit checks
|
||||||
[group('hooks')]
|
[group('hooks')]
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,8 @@ if [ "$HOOK_NAME" = "pre-commit" ]; then
|
||||||
elif [ "$HOOK_NAME" = "pre-push" ]; then
|
elif [ "$HOOK_NAME" = "pre-push" ]; then
|
||||||
echo "Running pre-push checks..."
|
echo "Running pre-push checks..."
|
||||||
just pre-push
|
just pre-push
|
||||||
|
elif [ "$HOOK_NAME" = "post-checkout" ]; then
|
||||||
|
just post-checkout
|
||||||
else
|
else
|
||||||
echo "Unknown hook: $HOOK_NAME"
|
echo "Unknown hook: $HOOK_NAME"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue