flask/.devcontainer/post-create-command.sh
2023-02-16 23:11:56 +00:00

22 lines
556 B
Bash
Executable file

#!/bin/bash
set -e
# Add user's fork as a remote
GIT_USER=$(git config user.name)
if ! git remote | grep -q "fork"; then
git remote add fork https://github.com/${GIT_USER}/flask
fi
# Create and activate a virtualenv
python3 -m venv .venv
. .venv/bin/activate
# Upgrade pip and setuptools
python -m pip install --upgrade pip setuptools
# Install the development dependencies, then install Flask in editable mode
pip install -r requirements/dev.txt && pip install -e .
# Install pre-commit hooks and coverage
pre-commit install
pip install coverage