From 884f5d94ab110f1611bd33a48ae0125070f681b4 Mon Sep 17 00:00:00 2001 From: M Atif Ali Date: Fri, 14 Feb 2025 14:04:33 +0500 Subject: [PATCH] =?UTF-8?q?Revert=20"feat(vscode-web):=20allow=20pinning?= =?UTF-8?q?=20vscode-web=20binary=20to=20a=20specific=20commi=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 3d33656bccdf58069e901324dbedae1e50938965. --- vscode-web/README.md | 8 ++++---- vscode-web/main.tf | 7 ------- vscode-web/run.sh | 11 ++--------- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/vscode-web/README.md b/vscode-web/README.md index a5a4b0d..d928205 100644 --- a/vscode-web/README.md +++ b/vscode-web/README.md @@ -15,7 +15,7 @@ Automatically install [Visual Studio Code Server](https://code.visualstudio.com/ module "vscode-web" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/vscode-web/coder" - version = "1.0.30" + version = "1.0.29" agent_id = coder_agent.example.id accept_license = true } @@ -31,7 +31,7 @@ module "vscode-web" { module "vscode-web" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/vscode-web/coder" - version = "1.0.30" + version = "1.0.29" agent_id = coder_agent.example.id install_prefix = "/home/coder/.vscode-web" folder = "/home/coder" @@ -45,7 +45,7 @@ module "vscode-web" { module "vscode-web" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/vscode-web/coder" - version = "1.0.30" + version = "1.0.29" agent_id = coder_agent.example.id extensions = ["github.copilot", "ms-python.python", "ms-toolsai.jupyter"] accept_license = true @@ -60,7 +60,7 @@ Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarte module "vscode-web" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/vscode-web/coder" - version = "1.0.30" + version = "1.0.29" agent_id = coder_agent.example.id extensions = ["dracula-theme.theme-dracula"] settings = { diff --git a/vscode-web/main.tf b/vscode-web/main.tf index 3b1a4ef..4a2f04e 100644 --- a/vscode-web/main.tf +++ b/vscode-web/main.tf @@ -59,12 +59,6 @@ variable "install_prefix" { default = "/tmp/vscode-web" } -variable "vscode_web_commit_id" { - type = string - description = "Specify the commit ID of the VS Code Web binary to pin to a specific version. If left empty, the latest stable version is used." - default = "" -} - variable "extensions" { type = list(string) description = "A list of extensions to install." @@ -157,7 +151,6 @@ resource "coder_script" "vscode-web" { FOLDER : var.folder, AUTO_INSTALL_EXTENSIONS : var.auto_install_extensions, SERVER_BASE_PATH : local.server_base_path, - VSCODE_WEB_COMMIT_ID : var.vscode_web_commit_id, }) run_on_start = true diff --git a/vscode-web/run.sh b/vscode-web/run.sh index 0392751..c3423df 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -59,15 +59,8 @@ case "$ARCH" in ;; esac -# Check if a specific VS Code Web commit ID was provided -if [ -n "${VSCODE_WEB_COMMIT_ID}" ]; then - HASH="${VSCODE_WEB_COMMIT_ID}" -else - HASH=$(curl -fsSL https://update.code.visualstudio.com/api/commits/stable/server-linux-$ARCH-web | cut -d '"' -f 2) -fi -printf "$${BOLD}VS Code Web commit id version $HASH.\n" - -output=$(curl -fsSL "https://vscode.download.prss.microsoft.com/dbazure/download/stable/$HASH/vscode-server-linux-$ARCH-web.tar.gz" | tar -xz -C "${INSTALL_PREFIX}" --strip-components 1) +HASH=$(curl -fsSL https://update.code.visualstudio.com/api/commits/stable/server-linux-$ARCH-web | cut -d '"' -f 2) +output=$(curl -fsSL https://vscode.download.prss.microsoft.com/dbazure/download/stable/$HASH/vscode-server-linux-$ARCH-web.tar.gz | tar -xz -C ${INSTALL_PREFIX} --strip-components 1) if [ $? -ne 0 ]; then echo "Failed to install Microsoft Visual Studio Code Server: $output"