vbv/git-pre-push.sh

23 lines
637 B
Bash
Executable File

#!/bin/bash
# script should fail when any process returns non zero code
set -e
echo 'prettier:check'
(cd client && npm run prettier:check)
echo 'lint and typecheck'
(cd client && npm run lint:errors && npm run typecheck)
echo 'ruff check'
ruff check server
echo 'ruff format --check'
ruff format server --check
echo 'check git-crypt files diff'
git-crypt status -e | sort > git-crypt-encrypted-files-check.txt && diff git-crypt-encrypted-files.txt git-crypt-encrypted-files-check.txt
echo 'check for secrets with truffleHog'
trufflehog --exclude_paths trufflehog-exclude-patterns.txt --allow trufflehog-allow.json --max_depth=3 .