From 4ac01da3c83df27d7e6758aef6def177c56e45fb Mon Sep 17 00:00:00 2001 From: StarTrooper08 Date: Sat, 2 Aug 2025 13:41:09 +0530 Subject: [PATCH 1/5] update: hide and disable git feature inside r-devcontainer --- .devcontainer/devcontainer.json | 6 +++++- scripts/localscript.sh | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ca2376a64..0c9cf35bf 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,6 +7,10 @@ "customizations": { "vscode": { "settings": { + "files.exclude": { + "**/.git": true + + }, "editor.tabSize": 8, "editor.indentSize": 4, "editor.detectIndentation": false, @@ -32,5 +36,5 @@ ] } }, - "postCreateCommand": "find . -wholename '*.git*' -type d -prune -o -type f -exec chown vscode:vscode {} \\; && sh /workspaces/r-dev-env/scripts/localscript.sh" + "postCreateCommand": "find . -wholename '*.git*' -type d -prune -o -type f -exec chown vscode:vscode {} \\; && sh /workspaces/r-dev-env/scripts/localscript.sh && sudo chown root:root .git && sudo chmod 700 .git" } diff --git a/scripts/localscript.sh b/scripts/localscript.sh index 3797814b7..083bf016f 100644 --- a/scripts/localscript.sh +++ b/scripts/localscript.sh @@ -25,7 +25,7 @@ cat $WORK_DIR/scripts/welcome_msg.sh >> ~/.bashrc #bash ~/.bashrc # Remove git directory if it exists -rm -rf .git +#rm -rf .git # copying vscode extension settings from devcontainer json to vscode settings json using jq if [ -f "$DEVCONTAINER_JSON" ]; then From 1e18d3f98f684652ab3efdc03ec9800fdaee2344 Mon Sep 17 00:00:00 2001 From: StarTrooper08 Date: Fri, 8 Aug 2025 06:35:14 +0530 Subject: [PATCH 2/5] hides git updates and files in vscode explorer --- .devcontainer/devcontainer.json | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 0c9cf35bf..bfe982074 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,10 +7,20 @@ "customizations": { "vscode": { "settings": { - "files.exclude": { - "**/.git": true - - }, + "git.ignoredRepositories": ["."], + "files.exclude": { + "**/.vscode": true, + "**/.devcontainer": true, + "**/.git": true, + "**/.gitignore": true, + "**/.gitpod.Dockerfile": true, + "**/.gitpod.yml": true, + "**/.markdownlint-cli2.yaml": true, + "**/.pre-commit-config.yaml": true, + "**/Dockerfile": true, + "**/mkdocs.yml": true, + "**/scripts": true + }, "editor.tabSize": 8, "editor.indentSize": 4, "editor.detectIndentation": false, @@ -36,5 +46,5 @@ ] } }, - "postCreateCommand": "find . -wholename '*.git*' -type d -prune -o -type f -exec chown vscode:vscode {} \\; && sh /workspaces/r-dev-env/scripts/localscript.sh && sudo chown root:root .git && sudo chmod 700 .git" + "postCreateCommand": "find . -wholename '*.git*' -type d -prune -o -type f -exec chown vscode:vscode {} \\; && sh /workspaces/r-dev-env/scripts/localscript.sh" } From aee01030e70b2303dbfcc4dedf3d9be427f11f66 Mon Sep 17 00:00:00 2001 From: StarTrooper08 Date: Fri, 8 Aug 2025 06:36:53 +0530 Subject: [PATCH 3/5] removed cmake-reinstall.sh --- reinstall-cmake.sh | 58 ---------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 reinstall-cmake.sh diff --git a/reinstall-cmake.sh b/reinstall-cmake.sh deleted file mode 100644 index c83325383..000000000 --- a/reinstall-cmake.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash -#------------------------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. -#------------------------------------------------------------------------------------------------------------- -# -set -e - -CMAKE_VERSION=${1:-"none"} - -if [ "${CMAKE_VERSION}" = "none" ]; then - echo "No CMake version specified, skipping CMake reinstallation" - exit 0 -fi - -# Cleanup temporary directory and associated files when exiting the script. -cleanup() { - EXIT_CODE=$? - set +e - if [[ -n "${TMP_DIR}" ]]; then - echo "Executing cleanup of tmp files" - rm -Rf "${TMP_DIR}" - fi - exit $EXIT_CODE -} -trap cleanup EXIT - - -echo "Installing CMake..." -apt-get -y purge --auto-remove cmake -mkdir -p /opt/cmake - -architecture=$(dpkg --print-architecture) -case "${architecture}" in - arm64) - ARCH=aarch64 ;; - amd64) - ARCH=x86_64 ;; - *) - echo "Unsupported architecture ${architecture}." - exit 1 - ;; -esac - -CMAKE_BINARY_NAME="cmake-${CMAKE_VERSION}-linux-${ARCH}.sh" -CMAKE_CHECKSUM_NAME="cmake-${CMAKE_VERSION}-SHA-256.txt" -TMP_DIR=$(mktemp -d -t cmake-XXXXXXXXXX) - -echo "${TMP_DIR}" -cd "${TMP_DIR}" - -curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_BINARY_NAME}" -O -curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_CHECKSUM_NAME}" -O - -sha256sum -c --ignore-missing "${CMAKE_CHECKSUM_NAME}" -sh "${TMP_DIR}/${CMAKE_BINARY_NAME}" --prefix=/opt/cmake --skip-license - -ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake From 6a675f99c5fb8f44b9674c1aaa2a17e53e7369f1 Mon Sep 17 00:00:00 2001 From: StarTrooper08 Date: Fri, 8 Aug 2025 14:34:32 +0530 Subject: [PATCH 4/5] ignore git workflow --- .devcontainer/devcontainer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index bfe982074..62e90add9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -12,6 +12,7 @@ "**/.vscode": true, "**/.devcontainer": true, "**/.git": true, + "**/.github": true, "**/.gitignore": true, "**/.gitpod.Dockerfile": true, "**/.gitpod.yml": true, From 548f07fc5143bfbb7cc38d8405eca39e4af05aa1 Mon Sep 17 00:00:00 2001 From: StarTrooper08 Date: Fri, 8 Aug 2025 14:53:40 +0530 Subject: [PATCH 5/5] gitignore .vscode dir --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8fce03092..14c1bd91b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ R-devel.tar.gz /venv .cache/ .Rproj.user +.vscode/