Files
musiclist-server/pre-commit.sh
2020-06-08 04:07:07 -04:00

19 lines
277 B
Bash
Executable File

#!/bin/sh
set -eu
STASH_NAME="pre-commit-$(date +%s)"
git stash save -q --keep-index $STASH_NAME
[ -d venv/ ] || python -m venv venv
. venv/bin/activate
pip install -r requirements.txt -r requirements-dev.txt
./lint.sh
LINT_RESULT=$?
git stash pop -q
exit $LINT_RESULT