Skip to content

Commit

Permalink
update devcontainer configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ion2088 committed Mar 14, 2024
1 parent 83471db commit 338c1ab
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .devcontainer/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

echo "Configuring the dev environment..."

# git credentials and keys
git config --global user.name "$DEV_NAME"
git config --global user.email "$DEV_EMAIL"
chmod 600 /root/.ssh/id_rsa

# testpypi
poetry config pypi-token.testpypi "$TEST_PYPI_TOKEN"

echo "Done."
7 changes: 4 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,22 @@
"--network=host",
"-e", "DEV_NAME=${localEnv:DEV_NAME}",
"-e", "DEV_EMAIL=${localEnv:DEV_EMAIL}",
"-e", "FIREDUST_API_KEY=${localEnv:FIREDUST_API_KEY}"
"-e", "FIREDUST_API_KEY=${localEnv:FIREDUST_API_KEY}",
"-e", "TEST_PYPI_TOKEN=${localEnv:TEST_PYPI_TOKEN}"
],
"mounts": [
// ----------------------------------------
// SSH keys
// mac ssh keys
"source=/Users/$(whoami)/.ssh,target=/root/.ssh,type=bind,consistency=cached",
"source=/Users/${localEnv:USER_NAME}/.ssh,target=/root/.ssh,type=bind,consistency=cached",
// linux ssh keys
// "source=/home/$(whoami)/.ssh,target=/root/.ssh,type=bind,consistency=cached",
// windows ssh keys
// "source=C:\\Users\\$(whoami)\\.ssh,target=/root/.ssh,type=bind,consistency=cached"
// TODO: comment out the lines for the OS you are not using
// ----------------------------------------
],
"postCreateCommand": "git config --global user.name $DEV_NAME && git config --global user.email $DEV_EMAIL && chmod 600 /root/.ssh/id_rsa",
"postCreateCommand": "bash .devcontainer/configure.sh",
"customizations": {
"vscode": {
"extensions": [
Expand Down

0 comments on commit 338c1ab

Please sign in to comment.