Skip to content

Commit

Permalink
install pre-commit in dev.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
thesujai committed Aug 30, 2024
1 parent 3b4e6f6 commit b59f70c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ update_or_add_env_var "BUILD_DATE" "$GIT_COMMIT_DATE"
update_or_add_env_var "MERGE_COMMIT_SHA" "$GIT_COMMIT_HASH"
update_or_add_env_var "BEHIND_COMMITS_COUNT" "$BEHIND_COMMITS_COUNT"

VENV_OPTION=$1

if [ "$VENV_OPTION" = "venv" ]; then
if [ ! -d "venv" ]; then
python3 -m venv venv
fi
source venv/bin/activate
fi

if [ -f ".pre-commit-config.yaml" ]; then
pip3 install -r ./backend/dev-requirements.txt
pre-commit install
fi

set -o allexport; source .env; set +o allexport
cd ./cli || exit

Expand Down

0 comments on commit b59f70c

Please # to comment.