Make script executable
This commit is contained in:
parent
4a50d91971
commit
a927a243b0
2 changed files with 8 additions and 1 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
// "features": {},
|
// "features": {},
|
||||||
|
|
||||||
// Runs the initial setup commands after the container is created.
|
// Runs the initial setup commands after the container is created.
|
||||||
"postCreateCommand": ".devcontainer/post-create-command.sh"
|
"postCreateCommand": "sudo chmod +x .devcontainer/post-create-command.sh && .devcontainer/post-create-command.sh"
|
||||||
|
|
||||||
// Activates the virtual environment after the container is started.
|
// Activates the virtual environment after the container is started.
|
||||||
// "postStartCommand": ". .venv/bin/activate"
|
// "postStartCommand": ". .venv/bin/activate"
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,28 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
# Add user's fork as a remote
|
# Add user's fork as a remote
|
||||||
GIT_USER=$(git config user.name)
|
GIT_USER=$(git config user.name)
|
||||||
git remote add fork https://github.com/${GIT_USER}/flask
|
git remote add fork https://github.com/${GIT_USER}/flask
|
||||||
|
echo "Added remote"
|
||||||
|
|
||||||
# Create and activate a virtualenv
|
# Create and activate a virtualenv
|
||||||
python3 -m venv .venv
|
python3 -m venv .venv
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate
|
||||||
|
echo "Created virtualenv"
|
||||||
|
|
||||||
# Upgrade pip and setuptools
|
# Upgrade pip and setuptools
|
||||||
python -m pip install --upgrade pip setuptools
|
python -m pip install --upgrade pip setuptools
|
||||||
|
echo "Upgraded setuptools"
|
||||||
|
|
||||||
# Install the development dependencies, then install Flask in editable mode
|
# Install the development dependencies, then install Flask in editable mode
|
||||||
pip install -r requirements/dev.txt && pip install -e .
|
pip install -r requirements/dev.txt && pip install -e .
|
||||||
|
echo "Installed dependencies and Flask"
|
||||||
|
|
||||||
# Install pre-commit hooks
|
# Install pre-commit hooks
|
||||||
pre-commit install
|
pre-commit install
|
||||||
|
echo "Installed pre-commit hooks"
|
||||||
|
|
||||||
# Install coverage
|
# Install coverage
|
||||||
pip install coverage
|
pip install coverage
|
||||||
|
echo "Installed coverage"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue