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)
|
2023-02-10 22:13:09 +00:00
|
|
|
if ! git remote | grep -q "fork"; then
|
2023-02-10 21:22:22 +00:00
|
|
|
git remote add fork https://github.com/${GIT_USER}/flask
|
|
|
|
|
fi
|
2023-02-10 18:22:44 +00:00
|
|
|
|
2023-02-16 23:11:56 +00:00
|
|
|
# Create and activate a virtualenv
|
|
|
|
|
python3 -m venv .venv
|
|
|
|
|
. .venv/bin/activate
|
|
|
|
|
|
2023-02-10 18:22:44 +00:00
|
|
|
# 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 .
|
|
|
|
|
|
2023-02-10 21:22:22 +00:00
|
|
|
# Install pre-commit hooks and coverage
|
2023-02-10 18:22:44 +00:00
|
|
|
pre-commit install
|
|
|
|
|
pip install coverage
|