From 2d644da2bc6bbfa7c951723f3deb3748cc2a997b Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 10 Jan 2025 17:31:46 +0000 Subject: [PATCH 1/2] chore: set git clone & dotfiles as optional --- dotfiles/run.sh | 2 +- git-clone/run.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles/run.sh b/dotfiles/run.sh index 94634392..4b480f49 100644 --- a/dotfiles/run.sh +++ b/dotfiles/run.sh @@ -18,6 +18,6 @@ if [ -n "$${DOTFILES_URI// }" ]; then CODER_BIN=$(which coder) DOTFILES_USER_HOME=$(eval echo ~"$DOTFILES_USER") - sudo -u "$DOTFILES_USER" sh -c "'$CODER_BIN' dotfiles '$DOTFILES_URI' -y 2>&1 | tee '$DOTFILES_USER_HOME'/.dotfiles.log" + sudo -u "$DOTFILES_USER" sh -c "'$CODER_BIN' dotfiles '$DOTFILES_URI' -y 2>&1 | tee '$DOTFILES_USER_HOME'/.dotfiles.log || true" fi fi diff --git a/git-clone/run.sh b/git-clone/run.sh index bd807177..316a7c70 100755 --- a/git-clone/run.sh +++ b/git-clone/run.sh @@ -9,7 +9,7 @@ CLONE_PATH="$${CLONE_PATH/#\~/$${HOME}}" # Check if the variable is empty... if [ -z "$REPO_URL" ]; then echo "No repository specified!" - exit 1 + exit 0 fi # Check if the variable is empty... From 71d648c7c18dae050001a6d6d9963cd269b49e60 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 10 Jan 2025 18:11:31 +0000 Subject: [PATCH 2/2] run update-version.sh --- dotfiles/README.md | 12 ++++++------ git-clone/README.md | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dotfiles/README.md b/dotfiles/README.md index fb54bab7..fc8fc11b 100644 --- a/dotfiles/README.md +++ b/dotfiles/README.md @@ -19,7 +19,7 @@ Under the hood, this module uses the [coder dotfiles](https://coder.com/docs/v2/ module "dotfiles" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/dotfiles/coder" - version = "1.0.18" + version = "1.0.28" agent_id = coder_agent.example.id } ``` @@ -32,7 +32,7 @@ module "dotfiles" { module "dotfiles" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/dotfiles/coder" - version = "1.0.18" + version = "1.0.28" agent_id = coder_agent.example.id } ``` @@ -43,7 +43,7 @@ module "dotfiles" { module "dotfiles" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/dotfiles/coder" - version = "1.0.18" + version = "1.0.28" agent_id = coder_agent.example.id user = "root" } @@ -55,14 +55,14 @@ module "dotfiles" { module "dotfiles" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/dotfiles/coder" - version = "1.0.18" + version = "1.0.28" agent_id = coder_agent.example.id } module "dotfiles-root" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/dotfiles/coder" - version = "1.0.18" + version = "1.0.28" agent_id = coder_agent.example.id user = "root" dotfiles_uri = module.dotfiles.dotfiles_uri @@ -77,7 +77,7 @@ You can set a default dotfiles repository for all users by setting the `default_ module "dotfiles" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/dotfiles/coder" - version = "1.0.18" + version = "1.0.28" agent_id = coder_agent.example.id default_dotfiles_uri = "https://github.com/coder/dotfiles" } diff --git a/git-clone/README.md b/git-clone/README.md index 0647f7f9..8e82bf86 100644 --- a/git-clone/README.md +++ b/git-clone/README.md @@ -15,7 +15,7 @@ This module allows you to automatically clone a repository by URL and skip if it module "git-clone" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" - version = "1.0.18" + version = "1.0.28" agent_id = coder_agent.example.id url = "https://github.com/coder/coder" } @@ -29,7 +29,7 @@ module "git-clone" { module "git-clone" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" - version = "1.0.18" + version = "1.0.28" agent_id = coder_agent.example.id url = "https://github.com/coder/coder" base_dir = "~/projects/coder" @@ -44,7 +44,7 @@ To use with [Git Authentication](https://coder.com/docs/v2/latest/admin/git-prov module "git-clone" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" - version = "1.0.18" + version = "1.0.28" agent_id = coder_agent.example.id url = "https://github.com/coder/coder" } @@ -70,7 +70,7 @@ data "coder_parameter" "git_repo" { module "git_clone" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" - version = "1.0.18" + version = "1.0.28" agent_id = coder_agent.example.id url = data.coder_parameter.git_repo.value } @@ -79,7 +79,7 @@ module "git_clone" { module "code-server" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/code-server/coder" - version = "1.0.18" + version = "1.0.28" agent_id = coder_agent.example.id order = 1 folder = "/home/${local.username}/${module.git_clone[count.index].folder_name}" @@ -104,7 +104,7 @@ Configuring `git-clone` for a self-hosted GitHub Enterprise Server running at `g module "git-clone" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" - version = "1.0.18" + version = "1.0.28" agent_id = coder_agent.example.id url = "https://github.example.com/coder/coder/tree/feat/example" git_providers = { @@ -123,7 +123,7 @@ To GitLab clone with a specific branch like `feat/example` module "git-clone" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" - version = "1.0.18" + version = "1.0.28" agent_id = coder_agent.example.id url = "https://gitlab.com/coder/coder/-/tree/feat/example" } @@ -135,7 +135,7 @@ Configuring `git-clone` for a self-hosted GitLab running at `gitlab.example.com` module "git-clone" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" - version = "1.0.18" + version = "1.0.28" agent_id = coder_agent.example.id url = "https://gitlab.example.com/coder/coder/-/tree/feat/example" git_providers = { @@ -156,7 +156,7 @@ For example, to clone the `feat/example` branch: module "git-clone" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" - version = "1.0.18" + version = "1.0.28" agent_id = coder_agent.example.id url = "https://github.com/coder/coder" branch_name = "feat/example" @@ -173,7 +173,7 @@ For example, this will clone into the `~/projects/coder/coder-dev` folder: module "git-clone" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/git-clone/coder" - version = "1.0.18" + version = "1.0.28" agent_id = coder_agent.example.id url = "https://github.com/coder/coder" folder_name = "coder-dev"