2023-02-10 18:22:44 +00:00
|
|
|
#!/bin/bash
|
2023-02-10 19:02:43 +00:00
|
|
|
set -e
|
2023-02-10 18:22:44 +00:00
|
|
|
|
|
|
|
|
# Add user's fork as a remote
|
|
|
|
|
GIT_USER=$(git config user.name)
|
|
|
|
|
git remote add fork https://github.com/${GIT_USER}/flask
|
2023-02-10 19:02:43 +00:00
|
|
|
echo "Added remote"
|
2023-02-10 18:22:44 +00:00
|
|
|
|
|
|
|
|
# Create and activate a virtualenv
|
|
|
|
|
python3 -m venv .venv
|
|
|
|
|
. .venv/bin/activate
|
2023-02-10 19:02:43 +00:00
|
|
|
echo "Created virtualenv"
|
2023-02-10 18:22:44 +00:00
|
|
|
|
|
|
|
|
# Upgrade pip and setuptools
|
|
|
|
|
python -m pip install --upgrade pip setuptools
|
2023-02-10 19:02:43 +00:00
|
|
|
echo "Upgraded setuptools"
|
2023-02-10 18:22:44 +00:00
|
|
|
|
|
|
|
|
# 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"
|
2023-02-10 18:22:44 +00:00
|
|
|
|
|
|
|
|
# Install pre-commit hooks
|
|
|
|
|
pre-commit install
|
2023-02-10 19:02:43 +00:00
|
|
|
echo "Installed pre-commit hooks"
|
2023-02-10 18:22:44 +00:00
|
|
|
|
|
|
|
|
# Install coverage
|
|
|
|
|
pip install coverage
|
2023-02-10 19:02:43 +00:00
|
|
|
echo "Installed coverage"
|