From ebba7f54ae144a0518ea43a4064e74534312eddf Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Thu, 13 Mar 2025 14:11:48 +0200 Subject: [PATCH 1/3] feat(code-server): link binary to PATH Noticed we don't place `code-server` in path, so made a quick fix. --- code-server/run.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code-server/run.sh b/code-server/run.sh index 457cff7f..c329ea90 100755 --- a/code-server/run.sh +++ b/code-server/run.sh @@ -42,6 +42,11 @@ fi if [ ! -f "$CODE_SERVER" ] || [ "${USE_CACHED}" != true ]; then printf "$${BOLD}Installing code-server!\n" + # Clean up from other install (in case install prefix changed). + if [ -e "$CODER_SCRIPT_BIN_DIR/code-server" ]; then + rm "$CODER_SCRIPT_BIN_DIR/code-server" + fi + ARGS=( "--method=standalone" "--prefix=${INSTALL_PREFIX}" @@ -58,6 +63,11 @@ if [ ! -f "$CODE_SERVER" ] || [ "${USE_CACHED}" != true ]; then printf "🥳 code-server has been installed in ${INSTALL_PREFIX}\n\n" fi +# Make the code-server available in PATH. +if [ -n "$CODER_SCRIPT_BIN_DIR" ] && [ ! -e "$CODER_SCRIPT_BIN_DIR/code-server" ]; then + ln -s "$CODE_SERVER" "$CODER_SCRIPT_BIN_DIR/code-server" +fi + # Get the list of installed extensions... LIST_EXTENSIONS=$($CODE_SERVER --list-extensions $EXTENSION_ARG) readarray -t EXTENSIONS_ARRAY <<< "$LIST_EXTENSIONS" From be3828f2cc5c0e57856b1dae302d8678c19db428 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Thu, 13 Mar 2025 14:13:29 +0200 Subject: [PATCH 2/3] Update run.sh --- code-server/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code-server/run.sh b/code-server/run.sh index c329ea90..99b30c0e 100755 --- a/code-server/run.sh +++ b/code-server/run.sh @@ -43,7 +43,7 @@ if [ ! -f "$CODE_SERVER" ] || [ "${USE_CACHED}" != true ]; then printf "$${BOLD}Installing code-server!\n" # Clean up from other install (in case install prefix changed). - if [ -e "$CODER_SCRIPT_BIN_DIR/code-server" ]; then + if [ -n "$CODER_SCRIPT_BIN_DIR" ] && [ -e "$CODER_SCRIPT_BIN_DIR/code-server" ]; then rm "$CODER_SCRIPT_BIN_DIR/code-server" fi From 527d0c8e8f859ae48dc66e668be3a2e633c64313 Mon Sep 17 00:00:00 2001 From: Phorcys <57866459+phorcys420@users.noreply.github.com> Date: Fri, 21 Mar 2025 01:36:07 +0000 Subject: [PATCH 3/3] chore: bump version --- code-server/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code-server/README.md b/code-server/README.md index 1121b1b8..e7098113 100644 --- a/code-server/README.md +++ b/code-server/README.md @@ -15,7 +15,7 @@ Automatically install [code-server](https://github.com/coder/code-server) in a w module "code-server" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" - version = "1.0.29" + version = "1.0.31" agent_id = coder_agent.example.id } ``` @@ -30,7 +30,7 @@ module "code-server" { module "code-server" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" - version = "1.0.29" + version = "1.0.31" agent_id = coder_agent.example.id install_version = "4.8.3" } @@ -44,7 +44,7 @@ Install the Dracula theme from [OpenVSX](https://open-vsx.org/): module "code-server" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" - version = "1.0.29" + version = "1.0.31" agent_id = coder_agent.example.id extensions = [ "dracula-theme.theme-dracula" @@ -62,7 +62,7 @@ Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarte module "code-server" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" - version = "1.0.29" + version = "1.0.31" agent_id = coder_agent.example.id extensions = ["dracula-theme.theme-dracula"] settings = { @@ -79,7 +79,7 @@ Just run code-server in the background, don't fetch it from GitHub: module "code-server" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" - version = "1.0.29" + version = "1.0.31" agent_id = coder_agent.example.id extensions = ["dracula-theme.theme-dracula", "ms-azuretools.vscode-docker"] } @@ -95,7 +95,7 @@ Run an existing copy of code-server if found, otherwise download from GitHub: module "code-server" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" - version = "1.0.29" + version = "1.0.31" agent_id = coder_agent.example.id use_cached = true extensions = ["dracula-theme.theme-dracula", "ms-azuretools.vscode-docker"] @@ -108,7 +108,7 @@ Just run code-server in the background, don't fetch it from GitHub: module "code-server" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" - version = "1.0.29" + version = "1.0.31" agent_id = coder_agent.example.id offline = true }