Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rsnodgrass committed Mar 28, 2024
1 parent 6331811 commit 0f22909
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# auto-update pre-commit versions (if > 1 week)
if which runonce &> /dev/null; then
if has runonce; then
DIR=`basename $(pwd)`
runonce -b -n $DIR -d 7 pre-commit autoupdate

# install any missing requirements
if [ -d .venv ]; then
if [ -f requirements.txt ]; then
rononce -b -n $DIR uv pip install -r requirements.txt
fi

if [ -f requirements-dev.txt ]; then
rononce -b -n $DIR uv pip install -r requirements-dev.txt
fi
fi

if [ -f .pre-commit-config.yaml ]; then
if has pre-commit; then
# auto-update pre-commit versions (if >= 1 week)
runonce -b -n $DIR -d 7 pre-commit autoupdate
fi
fi
fi

0 comments on commit 0f22909

Please sign in to comment.