19 lines
277 B
Bash
Executable File
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
|