From 9415772ec9595b39e84ef68c9faeb67f12ae97ed Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Tue, 14 Sep 2021 16:17:50 +0000 Subject: [PATCH 1/4] docs: cli: add information about coder update --- cli/installation.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/cli/installation.md b/cli/installation.md index a08417a9a..97cf7c336 100644 --- a/cli/installation.md +++ b/cli/installation.md @@ -55,3 +55,30 @@ Generate a static authentication token with the following command: ```console coder tokens create my-token ``` + +### Automatic Update (Linux, Mac, Windows) + +As of version `v1.23`, Coder CLI supports automatically updating itself. + +This works by querying the version of the currently logged in Coder instance, +downloading the corresponding version from GitHub, extracting it, and updating +the running binary in-place. + +You will be asked for confirmation before any changes are performed. + +To update `coder` to the version corresponding to your currently authenticated +Coder session, just run: + +```console +coder update +``` + +The `coder update` command accepts the following arguments: + +* `--coder` argument allows you to specify the exact Coder instance from which +to query the version. +* `--version` allows you to manually specify a given verison of Coder CLI to +download. +* `--force` causes Coder CLI to not ask for confirmation. + +**Note:** Coder CLI will refuse to auto-update if it is under certain paths. From 9d354773b5baad5645fa54edaab00008d5e3e236 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Tue, 14 Sep 2021 16:22:50 +0000 Subject: [PATCH 2/4] fixup! docs: cli: add information about coder update --- cli/installation.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/installation.md b/cli/installation.md index 97cf7c336..3fc1fd5ad 100644 --- a/cli/installation.md +++ b/cli/installation.md @@ -75,10 +75,10 @@ coder update The `coder update` command accepts the following arguments: -* `--coder` argument allows you to specify the exact Coder instance from which +- `--coder` argument allows you to specify the exact Coder instance from which to query the version. -* `--version` allows you to manually specify a given verison of Coder CLI to +- `--version` allows you to manually specify a given verison of Coder CLI to download. -* `--force` causes Coder CLI to not ask for confirmation. +- `--force` causes Coder CLI to not ask for confirmation. **Note:** Coder CLI will refuse to auto-update if it is under certain paths. From a3d15ef5162df946f221873ec581d276fbb20b6d Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Wed, 15 Sep 2021 12:56:14 -0500 Subject: [PATCH 3/4] condense instructions --- cli/installation.md | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/cli/installation.md b/cli/installation.md index 3fc1fd5ad..7a589f69e 100644 --- a/cli/installation.md +++ b/cli/installation.md @@ -56,18 +56,10 @@ Generate a static authentication token with the following command: coder tokens create my-token ``` -### Automatic Update (Linux, Mac, Windows) +## Update -As of version `v1.23`, Coder CLI supports automatically updating itself. - -This works by querying the version of the currently logged in Coder instance, -downloading the corresponding version from GitHub, extracting it, and updating -the running binary in-place. - -You will be asked for confirmation before any changes are performed. - -To update `coder` to the version corresponding to your currently authenticated -Coder session, just run: +To update the CLI to the version corresponding to your current Coder deployment, +run (you will be asked to confirm all changes before they're performed): ```console coder update @@ -75,10 +67,8 @@ coder update The `coder update` command accepts the following arguments: -- `--coder` argument allows you to specify the exact Coder instance from which -to query the version. -- `--version` allows you to manually specify a given verison of Coder CLI to -download. -- `--force` causes Coder CLI to not ask for confirmation. +- `--coder`: specify the Coder instance the CLI should use to query the version +- `--version`: specify the version that the CLI should download and upgrade to +- `--force`: omit prompts asking for change confirmations -**Note:** Coder CLI will refuse to auto-update if it is under certain paths. +**Note:** Coder CLI will not update if it is under certain paths. From b8b35ecbbbd7fbdd8a20c2d8dfd8726b9ee41499 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Wed, 15 Sep 2021 19:15:37 +0100 Subject: [PATCH 4/4] Apply suggestions from code review --- cli/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/installation.md b/cli/installation.md index 7a589f69e..198a7ccc5 100644 --- a/cli/installation.md +++ b/cli/installation.md @@ -71,4 +71,4 @@ The `coder update` command accepts the following arguments: - `--version`: specify the version that the CLI should download and upgrade to - `--force`: omit prompts asking for change confirmations -**Note:** Coder CLI will not update if it is under certain paths. +**Note:** Coder CLI will not update if it is located under `/var/tmp/coder` or `C:\Windows`.