Skip to content

Containers: Add VS Code tasks and improve overall documentation & flexibility #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Mar 15, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
document vscode tasks
  • Loading branch information
bpmct committed Mar 14, 2021
commit 45c63b9939b3afa9c33d5bb02067aad13708d9cd
2 changes: 1 addition & 1 deletion deploy-container/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Now, you can add the following the environment variables in the code-server clou
| RCLONE_REMOTE_NAME | the name of the remote you added in step 2.<br />check with `$ rclone listremotes` | code-server-remote | |
| RCLONE_SOURCE | source directory to sync files in the code-server container | the project directory: `/home/coder/project` | |
| RCLONE_DESTINATION | the path in the remote that rclone syncs to. change this if you have multiple code-server environments, or if you want to better organize your files. | code-server-files | |

| RCLONE_VSCODE_TASKS | import push and pull shortcuts into VS Code ![rclone screenshot from VS Code](../img/rclone-vscode-tasks.png) | true |
```sh

# --- How to use ---
Expand Down
18 changes: 15 additions & 3 deletions deploy-container/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,21 @@ else
touch /home/coder/.config/rclone/rclone.conf
echo $RCLONE_DATA | base64 -d > /home/coder/.config/rclone/rclone.conf

# copy our tasks config to VS Code
echo "[$PREFIX] Applying VS Code tasks config for rclone"
cp /tmp/rclone-tasks.json /home/coder/.local/share/code-server/User/tasks.json
# defasult to true
RCLONE_VSCODE_TASKS="${RCLONE_VSCODE_TASKS:-true}"

if [ $RCLONE_VSCODE_TASKS = "true" ]; then
# copy our tasks config to VS Code
echo "[$PREFIX] Applying VS Code tasks for rclone"
cp /tmp/rclone-tasks.json /home/coder/.local/share/code-server/User/tasks.json
# install the extension to add to menu bar
code-server --install-extension actboy168.tasks&
else
# user specified they don't want to apply the tasks
echo "[$PREFIX] Skipping VS Code tasks for rclone"
fi



# Full path to the remote filesystem
RCLONE_REMOTE_PATH=${RCLONE_REMOTE_NAME:-code-server-remote}:${RCLONE_DESTINATION:-code-server-files}
Expand Down
Binary file added img/rclone-vscode-tasks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.