try waiting for postCreateCommand
This commit is contained in:
parent
392c5542f6
commit
f5509a4268
2 changed files with 17 additions and 32 deletions
|
|
@ -1,26 +1,19 @@
|
||||||
// For format details, see https://aka.ms/devcontainer.json
|
|
||||||
{
|
{
|
||||||
"name": "pallets/flask",
|
"name": "pallets/flask",
|
||||||
"image": "mcr.microsoft.com/vscode/devcontainers/python:3",
|
"image": "mcr.microsoft.com/devcontainers/python:3",
|
||||||
|
"customizations": {
|
||||||
// Configure tool-specific properties.
|
"vscode": {
|
||||||
"customizations": {
|
"settings": {
|
||||||
// Configure properties specific to VS Code.
|
|
||||||
"vscode": {
|
|
||||||
// Set *default* container specific settings.json values on container create.
|
|
||||||
"settings": {
|
|
||||||
// Settings for the python extension.
|
|
||||||
"python.defaultInterpreterPath": "${workspaceFolder}/.venv",
|
"python.defaultInterpreterPath": "${workspaceFolder}/.venv",
|
||||||
"python.terminal.activateEnvInCurrentTerminal": true,
|
"python.terminal.activateEnvInCurrentTerminal": true,
|
||||||
// Prevent the terminal from refreshing on extension load.
|
"python.terminal.launchArgs": [
|
||||||
"terminal.integrated.environmentChangesRelaunch": false
|
"-X",
|
||||||
|
"dev"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// "onCreateCommand": "sudo cp .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt",
|
||||||
// Displays a custom welcome message.
|
"postCreateCommand": "sudo chmod +x .devcontainer/post-create-command.sh && .devcontainer/post-create-command.sh",
|
||||||
"onCreateCommand": "sudo cp .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt",
|
"waitFor": "postCreateCommand"
|
||||||
|
|
||||||
// Runs the initial setup commands after the container is created.
|
|
||||||
"postCreateCommand": "sudo chmod +x .devcontainer/post-create-command.sh && .devcontainer/post-create-command.sh"
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,20 +2,12 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Add user's fork as a remote
|
# Add user's fork as a remote
|
||||||
if ! git remote | grep -q "fork"; then
|
# if ! git remote | grep -q "fork"; then
|
||||||
git remote add fork https://github.com/${GITHUB_USER}/flask
|
# git remote add fork https://github.com/${GITHUB_USER}/flask
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# Create and activate a virtualenv
|
|
||||||
python3 -m venv .venv
|
python3 -m venv .venv
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate
|
||||||
|
pip install --upgrade pip setuptools
|
||||||
# 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 .
|
pip install -r requirements/dev.txt && pip install -e .
|
||||||
|
|
||||||
# Install pre-commit hooks and coverage
|
|
||||||
pre-commit install
|
pre-commit install
|
||||||
pip install coverage
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue