Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .devcontainer/devcontainer.metadata_template

This file was deleted.

20 changes: 20 additions & 0 deletions .devcontainer/devcontainer_template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "Gryphon Dev Container",
"dockerComposeFile": "docker-compose.yml",
"service": "dev",
"workspaceFolder": "/root/gra",
"postCreateCommand": "/bin/bash -c '/root/gra/.devcontainer/post_create.sh'",
"postStartCommand": "/bin/bash -c '/root/gra/.devcontainer/post_start.sh'",
"customizations": {
"vscode": {
"settings": {
"remote.autoForwardPorts": false
},
"extensions": [
"ms-python.python"
]
}
}
}
6 changes: 0 additions & 6 deletions .devcontainer/post_create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ fi
# echo -e "\e[36mSSH keys generated.\e[0m"
# fi

# Create devcontainer.metadata from template if it doesn't exist
if [ ! -f ~/gra/.devcontainer/devcontainer.metadata ]; then
echo -e "\e[36mCreating devcontainer.metadata ...\e[0m"
cp ~/gra/.devcontainer/devcontainer.metadata_template ~/gra/.devcontainer/devcontainer.metadata
fi

source ~/convenience.sh -i
setdevmaster
cb
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.devcontainer/.ssh/known_hosts
.devcontainer/devcontainer.metadata
.devcontainer/devcontainer.json
ros/gra_manager/scripts/states/__pycache__
*.pyc

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Development

## Dev container setup
Run `./setup/setup.sh` on Linux or `./setup/setup.bat` on Windows to create a `devcontainer.json`. After this, you will be able to open the folder with the Dev containers extension.

## MacOS
On Mac, you may need to run `sudo chown -R $(whoami) ~/.docker` to allow docker to run without sudo.

Expand Down
8 changes: 8 additions & 0 deletions setup/setup.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@echo off
if exist "%~dp0\..\.devcontainer/devcontainer.json" (
echo "devcontainer.json already exists"
exit 0
)
copy "%~dp0..\.devcontainer\devcontainer_template.json" "%~dp0..\.devcontainer\devcontainer.json"
echo "devcontainer.json created"

7 changes: 6 additions & 1 deletion setup/setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
./orbbec/orbbec_setup.sh
if [ -f "$(dirname "$0")/../.devcontainer/devcontainer.json" ]; then
echo "devcontainer.json already exists"
exit 0
fi
cp "$(dirname "$0")/../.devcontainer/devcontainer_template.json" "$(dirname "$0")/../.devcontainer/devcontainer.json"
echo "devcontainer.json" created