Move installation to onCreateCommand
This commit is contained in:
parent
58c52e84cd
commit
b6a76531b6
2 changed files with 15 additions and 3 deletions
|
|
@ -13,7 +13,5 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
// "onCreateCommand": "sudo cp .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt",
|
||||
"postCreateCommand": "sudo chmod +x .devcontainer/post-create-command.sh && .devcontainer/post-create-command.sh",
|
||||
"waitFor": "postCreateCommand"
|
||||
"onCreateCommand": "sudo chmod +x .devcontainer/on-create-command.sh && .devcontainer/on-create-command.sh"
|
||||
}
|
||||
|
|
|
|||
14
.devcontainer/on-create-command.sh
Executable file
14
.devcontainer/on-create-command.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if ! git remote | grep -q "fork"; then
|
||||
git remote add fork https://github.com/${GITHUB_USER}/flask
|
||||
fi
|
||||
|
||||
python3 -m venv .venv
|
||||
. .venv/bin/activate
|
||||
pip install --upgrade pip setuptools
|
||||
pip install -r requirements/dev.txt && pip install -e .
|
||||
pre-commit install
|
||||
|
||||
sudo cp .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt
|
||||
Loading…
Add table
Add a link
Reference in a new issue