Skip to content

Commit

Permalink
Add pre-commit hook (ordinals#3262)
Browse files Browse the repository at this point in the history
  • Loading branch information
bingryan authored Mar 14, 2024
1 parent 4d29e07 commit 463a2e0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec cargo fmt --check
10 changes: 10 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ fmt:
clippy:
cargo clippy --all --all-targets -- --deny warnings

install-git-hooks:
#!/usr/bin/env bash
set -euo pipefail
for hook in hooks/*; do
name=$(basename "$hook")
if [ ! -e ".git/hooks/$name" ]; then
ln -s "$PWD/$hook" ".git/hooks/$name"
fi
done
deploy branch remote chain domain:
ssh root@{{domain}} '\
export DEBIAN_FRONTEND=noninteractive \
Expand Down

0 comments on commit 463a2e0

Please sign in to comment.