flask/.devcontainer/post-create-command.sh

27 lines
644 B
Bash
Raw Normal View History

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