From 82a2d59c14f332e0456cae67444a0e70882171d2 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 23 Jan 2024 14:20:00 +0300 Subject: [PATCH 01/12] chore: bump version to 1.0.1 and add script to update them automatically. --- .sample/README.md | 8 ++++---- README.md | 2 +- aws-region/README.md | 6 +++--- azure-region/README.md | 6 +++--- code-server/README.md | 14 +++++++------- coder-login/README.md | 2 +- dotfiles/README.md | 2 +- exoscale-instance-type/README.md | 6 +++--- exoscale-zone/README.md | 6 +++--- filebrowser/README.md | 6 +++--- fly-region/README.md | 6 +++--- gcp-region/README.md | 8 ++++---- git-clone/README.md | 4 ++-- git-commit-signing/README.md | 2 +- git-config/README.md | 6 +++--- jetbrains-gateway/README.md | 4 ++-- jfrog-oauth/README.md | 6 +++--- jfrog-token/README.md | 6 +++--- jupyter-notebook/README.md | 2 +- jupyterlab/README.md | 2 +- package.json | 5 +++-- personalize/README.md | 2 +- slackme/README.md | 4 ++-- vault-github/README.md | 10 +++++----- vscode-desktop/README.md | 4 ++-- vscode-web/README.md | 4 ++-- 26 files changed, 67 insertions(+), 66 deletions(-) diff --git a/.sample/README.md b/.sample/README.md index f50a1016..08408a15 100644 --- a/.sample/README.md +++ b/.sample/README.md @@ -14,7 +14,7 @@ tags: [helper] ```hcl module "MODULE_NAME" { source = "registry.coder.com/modules/MODULE_NAME/coder" - version = "1.0.0" + version = "1.0.1" } ``` @@ -29,7 +29,7 @@ Install the Dracula theme from [OpenVSX](https://open-vsx.org/): ```hcl module "MODULE_NAME" { source = "registry.coder.com/modules/MODULE_NAME/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id extensions = [ "dracula-theme.theme-dracula" @@ -46,7 +46,7 @@ Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarte ```hcl module "MODULE_NAME" { source = "registry.coder.com/modules/MODULE_NAME/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id extensions = [ "dracula-theme.theme-dracula" ] settings = { @@ -62,7 +62,7 @@ Run code-server in the background, don't fetch it from GitHub: ```hcl module "MODULE_NAME" { source = "registry.coder.com/modules/MODULE_NAME/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id offline = true } diff --git a/README.md b/README.md index 522477b2..6f5158f9 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ e.g. ```hcl module "code-server" { source = "registry.coder.com/modules/code-server/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.main.id } ``` diff --git a/aws-region/README.md b/aws-region/README.md index 824d7d99..4c701d7c 100644 --- a/aws-region/README.md +++ b/aws-region/README.md @@ -17,7 +17,7 @@ Customize the preselected parameter value: ```hcl module "aws-region" { source = "registry.coder.com/modules/aws-region/coder" - version = "1.0.0" + version = "1.0.1" default = "us-east-1" } @@ -37,7 +37,7 @@ Change the display name and icon for a region using the corresponding maps: ```hcl module "aws-region" { source = "registry.coder.com/modules/aws-region/coder" - version = "1.0.0" + version = "1.0.1" default = "ap-south-1" custom_names = { "ap-south-1": "Awesome Mumbai!" @@ -61,7 +61,7 @@ Hide the Asia Pacific regions Seoul and Osaka: ```hcl module "aws-region" { source = "registry.coder.com/modules/aws-region/coder" - version = "1.0.0" + version = "1.0.1" exclude = [ "ap-northeast-2", "ap-northeast-3" ] } diff --git a/azure-region/README.md b/azure-region/README.md index b22dedfc..512b823a 100644 --- a/azure-region/README.md +++ b/azure-region/README.md @@ -14,7 +14,7 @@ This module adds a parameter with all Azure regions, allowing developers to sele ```hcl module "azure_region" { source = "registry.coder.com/modules/azure-region/coder" - version = "1.0.0" + version = "1.0.1" default = "eastus" } @@ -34,7 +34,7 @@ Change the display name and icon for a region using the corresponding maps: ```hcl module "azure-region" { source = "registry.coder.com/modules/azure-region/coder" - version = "1.0.0" + version = "1.0.1" custom_names = { "australia": "Go Australia!" } @@ -57,7 +57,7 @@ Hide all regions in Australia except australiacentral: ```hcl module "azure-region" { source = "registry.coder.com/modules/azure-region/coder" - version = "1.0.0" + version = "1.0.1" exclude = [ "australia", "australiacentral2", diff --git a/code-server/README.md b/code-server/README.md index 9bc04175..9123112f 100644 --- a/code-server/README.md +++ b/code-server/README.md @@ -14,7 +14,7 @@ Automatically install [code-server](https://github.com/coder/code-server) in a w ```hcl module "code-server" { source = "registry.coder.com/modules/code-server/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id } ``` @@ -28,9 +28,9 @@ module "code-server" { ```hcl module "code-server" { source = "registry.coder.com/modules/code-server/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id - install_version = "4.8.3" + install_version = "1.0.1" } ``` @@ -41,7 +41,7 @@ Install the Dracula theme from [OpenVSX](https://open-vsx.org/): ```hcl module "code-server" { source = "registry.coder.com/modules/code-server/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id extensions = [ "dracula-theme.theme-dracula" @@ -58,7 +58,7 @@ Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarte ```hcl module "settings" { source = "registry.coder.com/modules/code-server/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id extensions = [ "dracula-theme.theme-dracula" ] settings = { @@ -74,7 +74,7 @@ Just run code-server in the background, don't fetch it from GitHub: ```hcl module "settings" { source = "registry.coder.com/modules/code-server/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id extensions = [ "dracula-theme.theme-dracula", "ms-azuretools.vscode-docker" ] } @@ -87,7 +87,7 @@ Just run code-server in the background, don't fetch it from GitHub: ```hcl module "settings" { source = "registry.coder.com/modules/code-server/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id offline = true } diff --git a/coder-login/README.md b/coder-login/README.md index 0c5f8d97..bbbe22bf 100644 --- a/coder-login/README.md +++ b/coder-login/README.md @@ -14,7 +14,7 @@ Automatically logs the user into Coder when creating their workspace. ```hcl module "coder-login" { source = "registry.coder.com/modules/coder-login/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id } ``` diff --git a/dotfiles/README.md b/dotfiles/README.md index 1383c09a..5f9129f9 100644 --- a/dotfiles/README.md +++ b/dotfiles/README.md @@ -14,7 +14,7 @@ Allow developers to optionally bring their own [dotfiles repository](https://dot ```hcl module "dotfiles" { source = "registry.coder.com/modules/dotfiles/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id } ``` diff --git a/exoscale-instance-type/README.md b/exoscale-instance-type/README.md index 4868c9fc..3702617f 100644 --- a/exoscale-instance-type/README.md +++ b/exoscale-instance-type/README.md @@ -17,7 +17,7 @@ Customize the preselected parameter value: ```hcl module "exoscale-instance-type" { source = "registry.coder.com/modules/exoscale-instance-type/coder" - version = "1.0.0" + version = "1.0.1" default = "standard.medium" } @@ -45,7 +45,7 @@ Change the display name a type using the corresponding maps: ```hcl module "exoscale-instance-type" { source = "registry.coder.com/modules/exoscale-instance-type/coder" - version = "1.0.0" + version = "1.0.1" default = "standard.medium" custom_names = { "standard.medium": "Mittlere Instanz" # German translation @@ -77,7 +77,7 @@ Show only gpu1 types ```hcl module "exoscale-instance-type" { source = "registry.coder.com/modules/exoscale-instance-type/coder" - version = "1.0.0" + version = "1.0.1" default = "gpu.large" type_category = ["gpu"] exclude = [ diff --git a/exoscale-zone/README.md b/exoscale-zone/README.md index 360c54be..b5cd45db 100644 --- a/exoscale-zone/README.md +++ b/exoscale-zone/README.md @@ -17,7 +17,7 @@ Customize the preselected parameter value: ```hcl module "exoscale-zone" { source = "registry.coder.com/modules/exoscale-zone/coder" - version = "1.0.0" + version = "1.0.1" default = "ch-dk-2" } @@ -44,7 +44,7 @@ Change the display name and icon for a zone using the corresponding maps: ```hcl module "exoscale-zone" { source = "registry.coder.com/modules/exoscale-zone/coder" - version = "1.0.0" + version = "1.0.1" default = "at-vie-1" custom_names = { "at-vie-1": "Home Vienna" @@ -74,7 +74,7 @@ Hide the Switzerland zones Geneva and Zurich ```hcl module "exoscale-zone" { source = "registry.coder.com/modules/exoscale-zone/coder" - version = "1.0.0" + version = "1.0.1" exclude = [ "ch-gva-2", "ch-dk-2" ] } diff --git a/filebrowser/README.md b/filebrowser/README.md index bde76f6e..d7bd4886 100644 --- a/filebrowser/README.md +++ b/filebrowser/README.md @@ -14,7 +14,7 @@ A file browser for your workspace. ```hcl module "filebrowser" { source = "registry.coder.com/modules/filebrowser/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id } ``` @@ -28,7 +28,7 @@ module "filebrowser" { ```hcl module "filebrowser" { source = "registry.coder.com/modules/filebrowser/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id folder = "/home/coder/project" } @@ -39,7 +39,7 @@ module "filebrowser" { ```hcl module "filebrowser" { source = "registry.coder.com/modules/filebrowser/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id database_path = ".config/filebrowser.db" } diff --git a/fly-region/README.md b/fly-region/README.md index 7e5040f5..e9d5d32d 100644 --- a/fly-region/README.md +++ b/fly-region/README.md @@ -16,7 +16,7 @@ We can use the simplest format here, only adding a default selection as the `atl ```hcl module "fly-region" { source = "registry.coder.com/modules/fly-region/coder" - version = "1.0.0" + version = "1.0.1" default = "atl" } ``` @@ -32,7 +32,7 @@ The regions argument can be used to display only the desired regions in the Code ```hcl module "fly-region" { source = "registry.coder.com/modules/fly-region/coder" - version = "1.0.0" + version = "1.0.1" default = "ams" regions = ["ams", "arn", "atl"] } @@ -47,7 +47,7 @@ Set custom icons and names with their respective maps. ```hcl module "fly-region" { source = "registry.coder.com/modules/fly-region/coder" - version = "1.0.0" + version = "1.0.1" default = "ams" custom_icons = { "ams" = "/emojis/1f90e.png" diff --git a/gcp-region/README.md b/gcp-region/README.md index a78ed414..a1abd0e2 100644 --- a/gcp-region/README.md +++ b/gcp-region/README.md @@ -14,7 +14,7 @@ This module adds Google Cloud Platform regions to your Coder template. ```hcl module "gcp_region" { source = "registry.coder.com/modules/gcp-region/coder" - version = "1.0.0" + version = "1.0.1" regions = ["us", "europe"] } @@ -34,7 +34,7 @@ Note: setting `gpu_only = true` and using a default region without GPU support, ```hcl module "gcp_region" { source = "registry.coder.com/modules/gcp-region/coder" - version = "1.0.0" + version = "1.0.1" default = ["us-west1-a"] regions = ["us-west1"] gpu_only = false @@ -50,7 +50,7 @@ resource "google_compute_instance" "example" { ```hcl module "gcp_region" { source = "registry.coder.com/modules/gcp-region/coder" - version = "1.0.0" + version = "1.0.1" regions = ["europe-west"] single_zone_per_region = false } @@ -65,7 +65,7 @@ resource "google_compute_instance" "example" { ```hcl module "gcp_region" { source = "registry.coder.com/modules/gcp-region/coder" - version = "1.0.0" + version = "1.0.1" regions = ["us", "europe"] gpu_only = true single_zone_per_region = true diff --git a/git-clone/README.md b/git-clone/README.md index db4ce5f7..716a2253 100644 --- a/git-clone/README.md +++ b/git-clone/README.md @@ -14,7 +14,7 @@ This module allows you to automatically clone a repository by URL and skip if it ```hcl module "git-clone" { source = "registry.coder.com/modules/git-clone/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id url = "https://github.com/coder/coder" } @@ -35,7 +35,7 @@ data "coder_git_auth" "github" { ```hcl module "git-clone" { source = "registry.coder.com/modules/git-clone/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id url = "https://github.com/coder/coder" path = "~/projects/coder/coder" diff --git a/git-commit-signing/README.md b/git-commit-signing/README.md index c13e1f87..44998396 100644 --- a/git-commit-signing/README.md +++ b/git-commit-signing/README.md @@ -19,7 +19,7 @@ This module has a chance of conflicting with the user's dotfiles / the personali ```hcl module "git-commit-signing" { source = "registry.coder.com/modules/git-commit-signing/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id } ``` diff --git a/git-config/README.md b/git-config/README.md index 6c9d696e..5a94a614 100644 --- a/git-config/README.md +++ b/git-config/README.md @@ -14,7 +14,7 @@ Runs a script that updates git credentials in the workspace to match the user's ```hcl module "git-config" { source = "registry.coder.com/modules/git-config/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id } ``` @@ -28,7 +28,7 @@ TODO: Add screenshot ```hcl module "git-config" { source = "registry.coder.com/modules/git-config/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id allow_email_change = true } @@ -41,7 +41,7 @@ TODO: Add screenshot ```hcl module "git-config" { source = "registry.coder.com/modules/git-config/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id allow_username_change = false allow_email_change = false diff --git a/jetbrains-gateway/README.md b/jetbrains-gateway/README.md index c6c473d2..667ed556 100644 --- a/jetbrains-gateway/README.md +++ b/jetbrains-gateway/README.md @@ -14,7 +14,7 @@ This module adds a JetBrains Gateway Button to open any workspace with a single ```hcl module "jetbrains_gateway" { source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id folder = "/home/coder/example" jetbrains_ides = ["GO", "WS", "IU", "PY", "PS", "CL", "RM"] @@ -31,7 +31,7 @@ module "jetbrains_gateway" { ```hcl module "jetbrains_gateway" { source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id folder = "/home/coder/example" jetbrains_ides = ["GO", "WS"] diff --git a/jfrog-oauth/README.md b/jfrog-oauth/README.md index f81d837d..7c7af510 100644 --- a/jfrog-oauth/README.md +++ b/jfrog-oauth/README.md @@ -19,7 +19,7 @@ Install the JF CLI and authenticate package managers with Artifactory using OAut ```hcl module "jfrog" { source = "registry.coder.com/modules/jfrog-oauth/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id jfrog_url = "https://jfrog.example.com" username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username" @@ -87,7 +87,7 @@ Configure the Python pip package manager to fetch packages from Artifactory whil ```hcl module "jfrog" { source = "registry.coder.com/modules/jfrog-oauth/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id jfrog_url = "https://jfrog.example.com" auth_method = "oauth" @@ -115,7 +115,7 @@ The [JFrog extension](https://open-vsx.org/extension/JFrog/jfrog-vscode-extensio ```hcl module "jfrog" { source = "registry.coder.com/modules/jfrog-oauth/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id jfrog_url = "https://jfrog.example.com" username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username" diff --git a/jfrog-token/README.md b/jfrog-token/README.md index 2cba7ad9..3158ed2d 100644 --- a/jfrog-token/README.md +++ b/jfrog-token/README.md @@ -15,7 +15,7 @@ Install the JF CLI and authenticate package managers with Artifactory using Arti ```hcl module "jfrog" { source = "registry.coder.com/modules/jfrog-token/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id jfrog_url = "https://XXXX.jfrog.io" artifactory_access_token = var.artifactory_access_token @@ -48,7 +48,7 @@ variable "artifactory_access_token" { ```hcl module "jfrog" { source = "registry.coder.com/modules/jfrog-token/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id jfrog_url = "https://YYYY.jfrog.io" artifactory_access_token = var.artifactory_access_token # An admin access token @@ -81,7 +81,7 @@ The [JFrog extension](https://open-vsx.org/extension/JFrog/jfrog-vscode-extensio ```hcl module "jfrog" { source = "registry.coder.com/modules/jfrog-token/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id jfrog_url = "https://XXXX.jfrog.io" artifactory_access_token = var.artifactory_access_token diff --git a/jupyter-notebook/README.md b/jupyter-notebook/README.md index 69b61763..830b19a4 100644 --- a/jupyter-notebook/README.md +++ b/jupyter-notebook/README.md @@ -16,7 +16,7 @@ A module that adds Jupyter Notebook in your Coder template. ```hcl module "jupyter-notebook" { source = "registry.coder.com/modules/jupyter-notebook/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id } ``` diff --git a/jupyterlab/README.md b/jupyterlab/README.md index 8984da2f..80046b5b 100644 --- a/jupyterlab/README.md +++ b/jupyterlab/README.md @@ -16,7 +16,7 @@ A module that adds JupyterLab in your Coder template. ```hcl module "jupyterlab" { source = "registry.coder.com/modules/jupyterlab/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id } ``` diff --git a/package.json b/package.json index d3741224..7bd46ef6 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "test": "bun test", "fmt": "bun x prettier --plugin prettier-plugin-sh -w **/*.sh .sample/run.sh new.sh **/*.ts **/*.md *.md && terraform fmt **/*.tf .sample/main.tf", "fmt:ci": "bun x prettier --plugin prettier-plugin-sh --check **/*.sh .sample/run.sh new.sh **/*.ts **/*.md *.md && terraform fmt -check **/*.tf .sample/main.tf", - "lint": "bun run lint.ts" + "lint": "bun run lint.ts", + "update-version": "LATEST_TAG=$(git describe --abbrev=0 --tags | sed 's/^v//') && find . -name 'README.md' -exec sed -i \"s/version\\s*=\\s*\\\"[0-9]*\\.[0-9]*\\.[0-9]*\\\"/version = \\\"$LATEST_TAG\\\"/g\" {} \\;" }, "devDependencies": { "bun-types": "^1.0.18", @@ -15,4 +16,4 @@ "peerDependencies": { "typescript": "^5.3.3" } -} +} \ No newline at end of file diff --git a/personalize/README.md b/personalize/README.md index 4ddb0360..322a3eb4 100644 --- a/personalize/README.md +++ b/personalize/README.md @@ -14,7 +14,7 @@ Run a script on workspace start that allows developers to run custom commands to ```hcl module "personalize" { source = "registry.coder.com/modules/personalize/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id } ``` diff --git a/slackme/README.md b/slackme/README.md index 28b1f6a6..26a38cca 100644 --- a/slackme/README.md +++ b/slackme/README.md @@ -57,7 +57,7 @@ slackme npm run long-build ```hcl module "slackme" { source = "registry.coder.com/modules/slackme/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id auth_provider_id = "slack" } @@ -73,7 +73,7 @@ slackme npm run long-build ```hcl module "slackme" { source = "registry.coder.com/modules/slackme/coder" - version = "1.0.0" + version = "1.0.1" agent_id = coder_agent.example.id auth_provider_id = "slack" slack_message = < Date: Tue, 23 Jan 2024 15:06:31 +0300 Subject: [PATCH 02/12] add linting --- code-server/README.md | 2 +- lint.ts | 14 ++++++++++++++ package.json | 2 +- vault-github/README.md | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/code-server/README.md b/code-server/README.md index 9123112f..54916a98 100644 --- a/code-server/README.md +++ b/code-server/README.md @@ -30,7 +30,7 @@ module "code-server" { source = "registry.coder.com/modules/code-server/coder" version = "1.0.1" agent_id = coder_agent.example.id - install_version = "1.0.1" + install_version = "4.8.3" } ``` diff --git a/lint.ts b/lint.ts index 12e733cf..2328b487 100644 --- a/lint.ts +++ b/lint.ts @@ -62,6 +62,7 @@ for (const dir of dirs) { let h1 = false; let code = false; let paragraph = false; + let version = false; for (const token of tokens) { if (token.type === "heading" && token.depth === 1) { @@ -77,6 +78,16 @@ for (const dir of dirs) { } if (token.type === "code") { code = true; + if (token.lang !== "hcl") { + version = true; + continue; + } + let text = token.text; + // check if text contains version + if (text.includes("version")) { + version = true; + continue; + } continue; } } @@ -89,6 +100,9 @@ for (const dir of dirs) { if (!code) { error(dir.name, "missing example code block after paragraph"); } + if (!version) { + error(dir.name, "missing version in code block"); + } } if (badExit) { diff --git a/package.json b/package.json index 7bd46ef6..a8778dc3 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "fmt": "bun x prettier --plugin prettier-plugin-sh -w **/*.sh .sample/run.sh new.sh **/*.ts **/*.md *.md && terraform fmt **/*.tf .sample/main.tf", "fmt:ci": "bun x prettier --plugin prettier-plugin-sh --check **/*.sh .sample/run.sh new.sh **/*.ts **/*.md *.md && terraform fmt -check **/*.tf .sample/main.tf", "lint": "bun run lint.ts", - "update-version": "LATEST_TAG=$(git describe --abbrev=0 --tags | sed 's/^v//') && find . -name 'README.md' -exec sed -i \"s/version\\s*=\\s*\\\"[0-9]*\\.[0-9]*\\.[0-9]*\\\"/version = \\\"$LATEST_TAG\\\"/g\" {} \\;" + "update-version": "LATEST_TAG=$(git describe --abbrev=0 --tags | sed 's/^v//') && find . -name 'README.md' -exec sed -i \"s/\\( version \\s*=\\s*\\\"\\)[0-9]*\\.[0-9]*\\.[0-9]*\\(\\\"\\)/\\1$LATEST_TAG\\2/g\" {} \\;" }, "devDependencies": { "bun-types": "^1.0.18", diff --git a/vault-github/README.md b/vault-github/README.md index 1b43e943..bde96389 100644 --- a/vault-github/README.md +++ b/vault-github/README.md @@ -73,6 +73,6 @@ module "vault" { version = "1.0.1" agent_id = coder_agent.example.id vault_addr = "https://vault.example.com" - vault_cli_version = "1.0.1" + vault_cli_version = "1.15.0" } ``` From a03cfbc1bc30f3b276f9dcd5301c7bd3bae7986e Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 23 Jan 2024 15:27:49 +0300 Subject: [PATCH 03/12] formatting --- code-server/README.md | 4 ++-- coder-login/README.md | 2 +- exoscale-instance-type/README.md | 18 +++++++++--------- exoscale-zone/README.md | 6 +++--- gcp-region/README.md | 18 +++++++++--------- git-clone/README.md | 10 +++++----- jetbrains-gateway/README.md | 18 +++++++++--------- jfrog-token/README.md | 2 +- vault-github/README.md | 26 +++++++++++++------------- vscode-web/README.md | 14 +++++++------- 10 files changed, 59 insertions(+), 59 deletions(-) diff --git a/code-server/README.md b/code-server/README.md index 54916a98..8d450eb4 100644 --- a/code-server/README.md +++ b/code-server/README.md @@ -27,9 +27,9 @@ module "code-server" { ```hcl module "code-server" { - source = "registry.coder.com/modules/code-server/coder" + source = "registry.coder.com/modules/code-server/coder" version = "1.0.1" - agent_id = coder_agent.example.id + agent_id = coder_agent.example.id install_version = "4.8.3" } ``` diff --git a/coder-login/README.md b/coder-login/README.md index bbbe22bf..b6b72d8c 100644 --- a/coder-login/README.md +++ b/coder-login/README.md @@ -13,7 +13,7 @@ Automatically logs the user into Coder when creating their workspace. ```hcl module "coder-login" { - source = "registry.coder.com/modules/coder-login/coder" + source = "registry.coder.com/modules/coder-login/coder" version = "1.0.1" agent_id = coder_agent.example.id } diff --git a/exoscale-instance-type/README.md b/exoscale-instance-type/README.md index 3702617f..11dc07f5 100644 --- a/exoscale-instance-type/README.md +++ b/exoscale-instance-type/README.md @@ -22,13 +22,13 @@ module "exoscale-instance-type" { } resource "exoscale_compute_instance" "instance" { - type = module.exoscale-instance-type.value + type = module.exoscale-instance-type.value ... } resource "coder_metadata" "workspace_info" { item { - key = "instance type" + key = "instance type" value = module.exoscale-instance-type.name } } @@ -56,13 +56,13 @@ module "exoscale-instance-type" { } resource "exoscale_compute_instance" "instance" { - type = module.exoscale-instance-type.value + type = module.exoscale-instance-type.value ... } resource "coder_metadata" "workspace_info" { item { - key = "instance type" + key = "instance type" value = module.exoscale-instance-type.name } } @@ -76,11 +76,11 @@ Show only gpu1 types ```hcl module "exoscale-instance-type" { - source = "registry.coder.com/modules/exoscale-instance-type/coder" + source = "registry.coder.com/modules/exoscale-instance-type/coder" version = "1.0.1" - default = "gpu.large" + default = "gpu.large" type_category = ["gpu"] - exclude = [ + exclude = [ "gpu2.small", "gpu2.medium", "gpu2.large", @@ -93,13 +93,13 @@ module "exoscale-instance-type" { } resource "exoscale_compute_instance" "instance" { - type = module.exoscale-instance-type.value + type = module.exoscale-instance-type.value ... } resource "coder_metadata" "workspace_info" { item { - key = "instance type" + key = "instance type" value = module.exoscale-instance-type.name } } diff --git a/exoscale-zone/README.md b/exoscale-zone/README.md index b5cd45db..94c15337 100644 --- a/exoscale-zone/README.md +++ b/exoscale-zone/README.md @@ -28,7 +28,7 @@ data "exoscale_compute_template" "my_template" { } resource "exoscale_compute_instance" "instance" { - zone = module.exoscale-zone.value + zone = module.exoscale-zone.value .... } ``` @@ -60,7 +60,7 @@ data "exoscale_compute_template" "my_template" { } resource "exoscale_compute_instance" "instance" { - zone = module.exoscale-zone.value + zone = module.exoscale-zone.value .... } ``` @@ -84,7 +84,7 @@ data "exoscale_compute_template" "my_template" { } resource "exoscale_compute_instance" "instance" { - zone = module.exoscale-zone.value + zone = module.exoscale-zone.value .... } ``` diff --git a/gcp-region/README.md b/gcp-region/README.md index a1abd0e2..997f0137 100644 --- a/gcp-region/README.md +++ b/gcp-region/README.md @@ -13,7 +13,7 @@ This module adds Google Cloud Platform regions to your Coder template. ```hcl module "gcp_region" { - source = "registry.coder.com/modules/gcp-region/coder" + source = "registry.coder.com/modules/gcp-region/coder" version = "1.0.1" regions = ["us", "europe"] } @@ -33,10 +33,10 @@ Note: setting `gpu_only = true` and using a default region without GPU support, ```hcl module "gcp_region" { - source = "registry.coder.com/modules/gcp-region/coder" + source = "registry.coder.com/modules/gcp-region/coder" version = "1.0.1" - default = ["us-west1-a"] - regions = ["us-west1"] + default = ["us-west1-a"] + regions = ["us-west1"] gpu_only = false } @@ -49,9 +49,9 @@ resource "google_compute_instance" "example" { ```hcl module "gcp_region" { - source = "registry.coder.com/modules/gcp-region/coder" + source = "registry.coder.com/modules/gcp-region/coder" version = "1.0.1" - regions = ["europe-west"] + regions = ["europe-west"] single_zone_per_region = false } @@ -64,10 +64,10 @@ resource "google_compute_instance" "example" { ```hcl module "gcp_region" { - source = "registry.coder.com/modules/gcp-region/coder" + source = "registry.coder.com/modules/gcp-region/coder" version = "1.0.1" - regions = ["us", "europe"] - gpu_only = true + regions = ["us", "europe"] + gpu_only = true single_zone_per_region = true } diff --git a/git-clone/README.md b/git-clone/README.md index 716a2253..ca8c4504 100644 --- a/git-clone/README.md +++ b/git-clone/README.md @@ -13,10 +13,10 @@ This module allows you to automatically clone a repository by URL and skip if it ```hcl module "git-clone" { - source = "registry.coder.com/modules/git-clone/coder" + source = "registry.coder.com/modules/git-clone/coder" version = "1.0.1" agent_id = coder_agent.example.id - url = "https://github.com/coder/coder" + url = "https://github.com/coder/coder" } ``` @@ -34,10 +34,10 @@ data "coder_git_auth" "github" { ```hcl module "git-clone" { - source = "registry.coder.com/modules/git-clone/coder" + source = "registry.coder.com/modules/git-clone/coder" version = "1.0.1" agent_id = coder_agent.example.id - url = "https://github.com/coder/coder" - path = "~/projects/coder/coder" + url = "https://github.com/coder/coder" + path = "~/projects/coder/coder" } ``` diff --git a/jetbrains-gateway/README.md b/jetbrains-gateway/README.md index 667ed556..0311aae8 100644 --- a/jetbrains-gateway/README.md +++ b/jetbrains-gateway/README.md @@ -13,12 +13,12 @@ This module adds a JetBrains Gateway Button to open any workspace with a single ```hcl module "jetbrains_gateway" { - source = "registry.coder.com/modules/jetbrains-gateway/coder" + source = "registry.coder.com/modules/jetbrains-gateway/coder" version = "1.0.1" - agent_id = coder_agent.example.id - folder = "/home/coder/example" + agent_id = coder_agent.example.id + folder = "/home/coder/example" jetbrains_ides = ["GO", "WS", "IU", "PY", "PS", "CL", "RM"] - default = "PY" + default = "PY" } ``` @@ -30,12 +30,12 @@ module "jetbrains_gateway" { ```hcl module "jetbrains_gateway" { - source = "registry.coder.com/modules/jetbrains-gateway/coder" + source = "registry.coder.com/modules/jetbrains-gateway/coder" version = "1.0.1" - agent_id = coder_agent.example.id - folder = "/home/coder/example" - jetbrains_ides = ["GO", "WS"] - default = "GO" + agent_id = coder_agent.example.id + folder = "/home/coder/example" + jetbrains_ides = ["GO", "WS"] + default = "GO" } ``` diff --git a/jfrog-token/README.md b/jfrog-token/README.md index 3158ed2d..25312d70 100644 --- a/jfrog-token/README.md +++ b/jfrog-token/README.md @@ -31,7 +31,7 @@ Get a JFrog access token from your Artifactory instance. The token must be an [a ```hcl variable "artifactory_access_token" { - type = string + type = string sensitive = true } ``` diff --git a/vault-github/README.md b/vault-github/README.md index bde96389..6f399c8d 100644 --- a/vault-github/README.md +++ b/vault-github/README.md @@ -13,9 +13,9 @@ This module lets you authenticate with [Hashicorp Vault](https://www.vaultprojec ```hcl module "vault" { - source = "registry.coder.com/modules/vault-github/coder" + source = "registry.coder.com/modules/vault-github/coder" version = "1.0.1" - agent_id = coder_agent.example.id + agent_id = coder_agent.example.id vault_addr = "https://vault.example.com" } ``` @@ -23,7 +23,7 @@ module "vault" { Then you can use the Vault CLI in your workspaces to fetch secrets from Vault: ```shell -vault kv get -mount=secret my-secret +vault kv get -mount = secret my-secret ``` or using the Vault API: @@ -44,10 +44,10 @@ To configure the Vault module, you must set up a Vault GitHub auth method. See t ```hcl module "vault" { - source = "registry.coder.com/modules/vault-github/coder" + source = "registry.coder.com/modules/vault-github/coder" version = "1.0.1" - agent_id = coder_agent.example.id - vault_addr = "https://vault.example.com" + agent_id = coder_agent.example.id + vault_addr = "https://vault.example.com" coder_github_auth_id = "my-github-auth-id" } ``` @@ -56,11 +56,11 @@ module "vault" { ```hcl module "vault" { - source = "registry.coder.com/modules/vault-github/coder" + source = "registry.coder.com/modules/vault-github/coder" version = "1.0.1" - agent_id = coder_agent.example.id - vault_addr = "https://vault.example.com" - coder_github_auth_id = "my-github-auth-id" + agent_id = coder_agent.example.id + vault_addr = "https://vault.example.com" + coder_github_auth_id = "my-github-auth-id" vault_github_auth_path = "my-github-auth-path" } ``` @@ -69,10 +69,10 @@ module "vault" { ```hcl module "vault" { - source = "registry.coder.com/modules/vault-github/coder" + source = "registry.coder.com/modules/vault-github/coder" version = "1.0.1" - agent_id = coder_agent.example.id - vault_addr = "https://vault.example.com" + agent_id = coder_agent.example.id + vault_addr = "https://vault.example.com" vault_cli_version = "1.15.0" } ``` diff --git a/vscode-web/README.md b/vscode-web/README.md index 63a37c82..71969fd1 100644 --- a/vscode-web/README.md +++ b/vscode-web/README.md @@ -13,9 +13,9 @@ Automatically install [Visual Studio Code Server](https://code.visualstudio.com/ ```hcl module "vscode-web" { - source = "registry.coder.com/modules/vscode-web/coder" + source = "registry.coder.com/modules/vscode-web/coder" version = "1.0.1" - agent_id = coder_agent.example.id + agent_id = coder_agent.example.id accept_license = true } ``` @@ -28,11 +28,11 @@ module "vscode-web" { ```hcl module "vscode-web" { - source = "registry.coder.com/modules/vscode-web/coder" + source = "registry.coder.com/modules/vscode-web/coder" version = "1.0.1" - agent_id = coder_agent.example.id - install_dir = "/home/coder/.vscode-web" - folder = "/home/coder" - accept_license = true + agent_id = coder_agent.example.id + install_dir = "/home/coder/.vscode-web" + folder = "/home/coder" + accept_license = true } ``` From 0a4dc3150d4e69d10d208eb29d3bc5ceeaf799cd Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 26 Jan 2024 18:07:44 +0300 Subject: [PATCH 04/12] add script to automatically bump version and format --- .sample/README.md | 24 ++++++++++----------- README.md | 4 ++-- aws-region/README.md | 14 +++++++------ azure-region/README.md | 13 ++++++------ bun.lockb | Bin 7526 -> 8997 bytes code-server/README.md | 35 ++++++++++++++++--------------- coder-login/README.md | 4 ++-- dotfiles/README.md | 4 ++-- exoscale-instance-type/README.md | 24 +++++++++++---------- exoscale-zone/README.md | 14 +++++++------ filebrowser/README.md | 16 +++++++------- fly-region/README.md | 14 +++++++------ gcp-region/README.md | 28 ++++++++++++------------- git-clone/README.md | 10 ++++----- git-commit-signing/README.md | 4 ++-- git-config/README.md | 20 ++++++++---------- jetbrains-gateway/README.md | 20 +++++++++--------- jfrog-oauth/README.md | 31 ++++++++++++++------------- jfrog-token/README.md | 28 ++++++++++++++----------- jupyter-notebook/README.md | 4 ++-- jupyterlab/README.md | 4 ++-- package.json | 2 +- personalize/README.md | 4 ++-- slackme/README.md | 14 ++++++------- update-version.sh | 18 ++++++++++++++++ vault-github/README.md | 34 +++++++++++++++--------------- vscode-desktop/README.md | 10 ++++----- vscode-web/README.md | 16 +++++++------- 28 files changed, 223 insertions(+), 190 deletions(-) create mode 100755 update-version.sh diff --git a/.sample/README.md b/.sample/README.md index 08408a15..4a107878 100644 --- a/.sample/README.md +++ b/.sample/README.md @@ -13,8 +13,8 @@ tags: [helper] ```hcl module "MODULE_NAME" { - source = "registry.coder.com/modules/MODULE_NAME/coder" - version = "1.0.1" + source = "registry.coder.com/modules/MODULE_NAME/coder" + version = "1.0.2" } ``` @@ -28,9 +28,9 @@ Install the Dracula theme from [OpenVSX](https://open-vsx.org/): ```hcl module "MODULE_NAME" { - source = "registry.coder.com/modules/MODULE_NAME/coder" - version = "1.0.1" - agent_id = coder_agent.example.id + source = "registry.coder.com/modules/MODULE_NAME/coder" + version = "1.0.2" + agent_id = coder_agent.example.id extensions = [ "dracula-theme.theme-dracula" ] @@ -45,11 +45,11 @@ Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarte ```hcl module "MODULE_NAME" { - source = "registry.coder.com/modules/MODULE_NAME/coder" - version = "1.0.1" - agent_id = coder_agent.example.id + source = "registry.coder.com/modules/MODULE_NAME/coder" + version = "1.0.2" + agent_id = coder_agent.example.id extensions = [ "dracula-theme.theme-dracula" ] - settings = { + settings = { "workbench.colorTheme" = "Dracula" } } @@ -61,9 +61,9 @@ Run code-server in the background, don't fetch it from GitHub: ```hcl module "MODULE_NAME" { - source = "registry.coder.com/modules/MODULE_NAME/coder" - version = "1.0.1" + source = "registry.coder.com/modules/MODULE_NAME/coder" + version = "1.0.2" agent_id = coder_agent.example.id - offline = true + offline = true } ``` diff --git a/README.md b/README.md index 6f5158f9..0ee4c8d7 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ e.g. ```hcl module "code-server" { - source = "registry.coder.com/modules/code-server/coder" - version = "1.0.1" + source = "registry.coder.com/modules/code-server/coder" + version = "1.0.2" agent_id = coder_agent.main.id } ``` diff --git a/aws-region/README.md b/aws-region/README.md index 4c701d7c..6fea02ac 100644 --- a/aws-region/README.md +++ b/aws-region/README.md @@ -16,8 +16,8 @@ Customize the preselected parameter value: ```hcl module "aws-region" { - source = "registry.coder.com/modules/aws-region/coder" - version = "1.0.1" + source = "registry.coder.com/modules/aws-region/coder" + version = "1.0.2" default = "us-east-1" } @@ -36,12 +36,14 @@ Change the display name and icon for a region using the corresponding maps: ```hcl module "aws-region" { - source = "registry.coder.com/modules/aws-region/coder" - version = "1.0.1" + source = "registry.coder.com/modules/aws-region/coder" + version = "1.0.2" default = "ap-south-1" + custom_names = { "ap-south-1": "Awesome Mumbai!" } + custom_icons = { "ap-south-1": "/emojis/1f33a.png" } @@ -60,8 +62,8 @@ Hide the Asia Pacific regions Seoul and Osaka: ```hcl module "aws-region" { - source = "registry.coder.com/modules/aws-region/coder" - version = "1.0.1" + source = "registry.coder.com/modules/aws-region/coder" + version = "1.0.2" exclude = [ "ap-northeast-2", "ap-northeast-3" ] } diff --git a/azure-region/README.md b/azure-region/README.md index 512b823a..8c515e43 100644 --- a/azure-region/README.md +++ b/azure-region/README.md @@ -13,8 +13,8 @@ This module adds a parameter with all Azure regions, allowing developers to sele ```hcl module "azure_region" { - source = "registry.coder.com/modules/azure-region/coder" - version = "1.0.1" + source = "registry.coder.com/modules/azure-region/coder" + version = "1.0.2" default = "eastus" } @@ -33,8 +33,9 @@ Change the display name and icon for a region using the corresponding maps: ```hcl module "azure-region" { - source = "registry.coder.com/modules/azure-region/coder" - version = "1.0.1" + source = "registry.coder.com/modules/azure-region/coder" + version = "1.0.2" + custom_names = { "australia": "Go Australia!" } @@ -56,8 +57,8 @@ Hide all regions in Australia except australiacentral: ```hcl module "azure-region" { - source = "registry.coder.com/modules/azure-region/coder" - version = "1.0.1" + source = "registry.coder.com/modules/azure-region/coder" + version = "1.0.2" exclude = [ "australia", "australiacentral2", diff --git a/bun.lockb b/bun.lockb index f8f49403f8df43ea5f007841780199346be3a142..7b18be00a743060d7fcceedd731e857224f0a476 100755 GIT binary patch delta 1368 zcmaE6wbX5bo~G%n;!P!73-9L3TxzS9U=@tJ`yl$$p@*F>?yG&;cx z&txq=v0{eoD;5R@9tMVnhd`PWNM8fe+&~&EKAD$swgP9q&9PU3vvw~&J)?4d)}_pe z`cb`VTWu|2;+t16E?}H|g2iBS1@iwf5BqICx#NAT3>2RfATu& z@-sE_Ov!}cC7fH`4TC2)oJvpR`ntZgUG_`RGVAFR7S^kM4eX5D%*xfl?C>onE>QlQ z+Uch$b!?W|aUJZ1?=-c&1*XJr$-Xct@A!k)?nU?dx~J+3NzOH&aM$@jTK9V|rbT&$+y_k6FhXZ7)r=}KqAO;v#2XJq)t{|^{0!r;Jw5G?yrgaVJ> znl?%6qI}l7CogV=zIpkuW7++JZAEvD{(FZ_Qs&_QxAR+I{bI||h2cvTJ2oDVUce#L z+*WV9ubM^T!NxC027{sv23RD1&NC0#9>X*B*_+vn|6~ldPX7AgT2YE(YP65oyL0Zf z)B1L`Nk3gaIkmLh?b%kJmcMhhI?Q)Gt}(ewzWBpSoew~RU=9{#U4LS;=bi6&n?w1x)ojtD?WRWkzHrYm9zJ&8A6; z-yiPx7EOCqwFJpvvCTJmw=+(@z!$K20{?dA$shQSa5aEZ4G^plpByM`ulMgi1b~Eq z?f|DNSOCKKH=tS!BqpyDR-1f5ScDU#1QZ;ilOGD3^MT|OpsDZxSP`SxWKR)qIgk>N zQXwD)D+kgapb8VDC(jen+I&Xj6=OXtU&3-96QdSTB?!QBE-Zf{WMFw4mQ$G+<4pC8 z%=AncaGQpyrw*it7pQ52G{iy!8DO}GOuizf!v+zUBwir(6qr3hb)hkJ_aww@RNG;aS%TGy#GRuog^HMUCGj%~SlMSV1 zl#uwv`nvkaTwS1xEcA>f15Ffx>j$bSFV?ltGu1PkoFJ(ng=7a%3S^b8k%69}p`JNN PA0gw-^h_r=$vgo7+*GTY delta 436 zcmZ4L_RMO6o@Pzo)}Ke)r7j;oxz_dIf-bf@`j33qy6@~4wA$quc$;a>H5mpl5S|z= z&*UyVv0}z#1I8JfUob9UoZP`=uz3gb1SUqI$sZZjCmS$vFg;?KT*ZEf6{JOYaw5lM z2y3$>rw)@t-KWk7<|CP3lds-kJ9zlSvjoTgUio24zsv$=n;34Dc_et4LFAu#&w`lv zT%mVeo3|bm{5`v;e~(o2pSJ}kvu~Z=+{)d->~OWLnpwE@Q}Z6t*#*}nzFc19pe?Ap zD`~7Y;=4|Vmd!4E^!NCUe#ZkSe>jYGAo7m)25?Y%-NW5d@Vi1QYY!IKECG9YIgLHw^H5LX2 p9tMVn77Noej1_$UHb9k}li6$~bB&SFV6&i{JTsG_#bigNCjbLsmu&z5 diff --git a/code-server/README.md b/code-server/README.md index 8d450eb4..8194ac8d 100644 --- a/code-server/README.md +++ b/code-server/README.md @@ -13,8 +13,8 @@ Automatically install [code-server](https://github.com/coder/code-server) in a w ```hcl module "code-server" { - source = "registry.coder.com/modules/code-server/coder" - version = "1.0.1" + source = "registry.coder.com/modules/code-server/coder" + version = "1.0.2" agent_id = coder_agent.example.id } ``` @@ -27,9 +27,9 @@ module "code-server" { ```hcl module "code-server" { - source = "registry.coder.com/modules/code-server/coder" - version = "1.0.1" - agent_id = coder_agent.example.id + source = "registry.coder.com/modules/code-server/coder" + version = "1.0.2" + agent_id = coder_agent.example.id install_version = "4.8.3" } ``` @@ -40,9 +40,9 @@ Install the Dracula theme from [OpenVSX](https://open-vsx.org/): ```hcl module "code-server" { - source = "registry.coder.com/modules/code-server/coder" - version = "1.0.1" - agent_id = coder_agent.example.id + source = "registry.coder.com/modules/code-server/coder" + version = "1.0.2" + agent_id = coder_agent.example.id extensions = [ "dracula-theme.theme-dracula" ] @@ -57,10 +57,11 @@ Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarte ```hcl module "settings" { - source = "registry.coder.com/modules/code-server/coder" - version = "1.0.1" - agent_id = coder_agent.example.id + source = "registry.coder.com/modules/code-server/coder" + version = "1.0.2" + agent_id = coder_agent.example.id extensions = [ "dracula-theme.theme-dracula" ] + settings = { "workbench.colorTheme" = "Dracula" } @@ -73,9 +74,9 @@ Just run code-server in the background, don't fetch it from GitHub: ```hcl module "settings" { - source = "registry.coder.com/modules/code-server/coder" - version = "1.0.1" - agent_id = coder_agent.example.id + source = "registry.coder.com/modules/code-server/coder" + version = "1.0.2" + agent_id = coder_agent.example.id extensions = [ "dracula-theme.theme-dracula", "ms-azuretools.vscode-docker" ] } ``` @@ -86,9 +87,9 @@ Just run code-server in the background, don't fetch it from GitHub: ```hcl module "settings" { - source = "registry.coder.com/modules/code-server/coder" - version = "1.0.1" + source = "registry.coder.com/modules/code-server/coder" + version = "1.0.2" agent_id = coder_agent.example.id - offline = true + offline = true } ``` diff --git a/coder-login/README.md b/coder-login/README.md index b6b72d8c..d8e65073 100644 --- a/coder-login/README.md +++ b/coder-login/README.md @@ -13,8 +13,8 @@ Automatically logs the user into Coder when creating their workspace. ```hcl module "coder-login" { - source = "registry.coder.com/modules/coder-login/coder" - version = "1.0.1" + source = "registry.coder.com/modules/coder-login/coder" + version = "1.0.2" agent_id = coder_agent.example.id } ``` diff --git a/dotfiles/README.md b/dotfiles/README.md index 5f9129f9..162e10c8 100644 --- a/dotfiles/README.md +++ b/dotfiles/README.md @@ -13,8 +13,8 @@ Allow developers to optionally bring their own [dotfiles repository](https://dot ```hcl module "dotfiles" { - source = "registry.coder.com/modules/dotfiles/coder" - version = "1.0.1" + source = "registry.coder.com/modules/dotfiles/coder" + version = "1.0.2" agent_id = coder_agent.example.id } ``` diff --git a/exoscale-instance-type/README.md b/exoscale-instance-type/README.md index 11dc07f5..1b5cfbeb 100644 --- a/exoscale-instance-type/README.md +++ b/exoscale-instance-type/README.md @@ -16,8 +16,8 @@ Customize the preselected parameter value: ```hcl module "exoscale-instance-type" { - source = "registry.coder.com/modules/exoscale-instance-type/coder" - version = "1.0.1" + source = "registry.coder.com/modules/exoscale-instance-type/coder" + version = "1.0.2" default = "standard.medium" } @@ -28,7 +28,7 @@ resource "exoscale_compute_instance" "instance" { resource "coder_metadata" "workspace_info" { item { - key = "instance type" + key = "instance type" value = module.exoscale-instance-type.name } } @@ -44,12 +44,14 @@ Change the display name a type using the corresponding maps: ```hcl module "exoscale-instance-type" { - source = "registry.coder.com/modules/exoscale-instance-type/coder" - version = "1.0.1" + source = "registry.coder.com/modules/exoscale-instance-type/coder" + version = "1.0.2" default = "standard.medium" + custom_names = { "standard.medium": "Mittlere Instanz" # German translation } + custom_descriptions = { "standard.medium": "4 GB Arbeitsspeicher, 2 Kerne, 10 - 400 GB Festplatte" # German translation } @@ -62,7 +64,7 @@ resource "exoscale_compute_instance" "instance" { resource "coder_metadata" "workspace_info" { item { - key = "instance type" + key = "instance type" value = module.exoscale-instance-type.name } } @@ -76,11 +78,11 @@ Show only gpu1 types ```hcl module "exoscale-instance-type" { - source = "registry.coder.com/modules/exoscale-instance-type/coder" - version = "1.0.1" - default = "gpu.large" + source = "registry.coder.com/modules/exoscale-instance-type/coder" + version = "1.0.2" + default = "gpu.large" type_category = ["gpu"] - exclude = [ + exclude = [ "gpu2.small", "gpu2.medium", "gpu2.large", @@ -99,7 +101,7 @@ resource "exoscale_compute_instance" "instance" { resource "coder_metadata" "workspace_info" { item { - key = "instance type" + key = "instance type" value = module.exoscale-instance-type.name } } diff --git a/exoscale-zone/README.md b/exoscale-zone/README.md index 94c15337..a383b4a1 100644 --- a/exoscale-zone/README.md +++ b/exoscale-zone/README.md @@ -16,8 +16,8 @@ Customize the preselected parameter value: ```hcl module "exoscale-zone" { - source = "registry.coder.com/modules/exoscale-zone/coder" - version = "1.0.1" + source = "registry.coder.com/modules/exoscale-zone/coder" + version = "1.0.2" default = "ch-dk-2" } @@ -43,12 +43,14 @@ Change the display name and icon for a zone using the corresponding maps: ```hcl module "exoscale-zone" { - source = "registry.coder.com/modules/exoscale-zone/coder" - version = "1.0.1" + source = "registry.coder.com/modules/exoscale-zone/coder" + version = "1.0.2" default = "at-vie-1" + custom_names = { "at-vie-1": "Home Vienna" } + custom_icons = { "at-vie-1": "/emojis/1f3e0.png" } @@ -73,8 +75,8 @@ Hide the Switzerland zones Geneva and Zurich ```hcl module "exoscale-zone" { - source = "registry.coder.com/modules/exoscale-zone/coder" - version = "1.0.1" + source = "registry.coder.com/modules/exoscale-zone/coder" + version = "1.0.2" exclude = [ "ch-gva-2", "ch-dk-2" ] } diff --git a/filebrowser/README.md b/filebrowser/README.md index d7bd4886..66e8654a 100644 --- a/filebrowser/README.md +++ b/filebrowser/README.md @@ -13,8 +13,8 @@ A file browser for your workspace. ```hcl module "filebrowser" { - source = "registry.coder.com/modules/filebrowser/coder" - version = "1.0.1" + source = "registry.coder.com/modules/filebrowser/coder" + version = "1.0.2" agent_id = coder_agent.example.id } ``` @@ -27,10 +27,10 @@ module "filebrowser" { ```hcl module "filebrowser" { - source = "registry.coder.com/modules/filebrowser/coder" - version = "1.0.1" + source = "registry.coder.com/modules/filebrowser/coder" + version = "1.0.2" agent_id = coder_agent.example.id - folder = "/home/coder/project" + folder = "/home/coder/project" } ``` @@ -38,9 +38,9 @@ module "filebrowser" { ```hcl module "filebrowser" { - source = "registry.coder.com/modules/filebrowser/coder" - version = "1.0.1" - agent_id = coder_agent.example.id + source = "registry.coder.com/modules/filebrowser/coder" + version = "1.0.2" + agent_id = coder_agent.example.id database_path = ".config/filebrowser.db" } ``` diff --git a/fly-region/README.md b/fly-region/README.md index e9d5d32d..29726ab1 100644 --- a/fly-region/README.md +++ b/fly-region/README.md @@ -15,8 +15,8 @@ We can use the simplest format here, only adding a default selection as the `atl ```hcl module "fly-region" { - source = "registry.coder.com/modules/fly-region/coder" - version = "1.0.1" + source = "registry.coder.com/modules/fly-region/coder" + version = "1.0.2" default = "atl" } ``` @@ -31,8 +31,8 @@ The regions argument can be used to display only the desired regions in the Code ```hcl module "fly-region" { - source = "registry.coder.com/modules/fly-region/coder" - version = "1.0.1" + source = "registry.coder.com/modules/fly-region/coder" + version = "1.0.2" default = "ams" regions = ["ams", "arn", "atl"] } @@ -46,12 +46,14 @@ Set custom icons and names with their respective maps. ```hcl module "fly-region" { - source = "registry.coder.com/modules/fly-region/coder" - version = "1.0.1" + source = "registry.coder.com/modules/fly-region/coder" + version = "1.0.2" default = "ams" + custom_icons = { "ams" = "/emojis/1f90e.png" } + custom_names = { "ams" = "We love the Netherlands!" } diff --git a/gcp-region/README.md b/gcp-region/README.md index 997f0137..986a44e1 100644 --- a/gcp-region/README.md +++ b/gcp-region/README.md @@ -13,8 +13,8 @@ This module adds Google Cloud Platform regions to your Coder template. ```hcl module "gcp_region" { - source = "registry.coder.com/modules/gcp-region/coder" - version = "1.0.1" + source = "registry.coder.com/modules/gcp-region/coder" + version = "1.0.2" regions = ["us", "europe"] } @@ -33,10 +33,10 @@ Note: setting `gpu_only = true` and using a default region without GPU support, ```hcl module "gcp_region" { - source = "registry.coder.com/modules/gcp-region/coder" - version = "1.0.1" - default = ["us-west1-a"] - regions = ["us-west1"] + source = "registry.coder.com/modules/gcp-region/coder" + version = "1.0.2" + default = ["us-west1-a"] + regions = ["us-west1"] gpu_only = false } @@ -49,9 +49,9 @@ resource "google_compute_instance" "example" { ```hcl module "gcp_region" { - source = "registry.coder.com/modules/gcp-region/coder" - version = "1.0.1" - regions = ["europe-west"] + source = "registry.coder.com/modules/gcp-region/coder" + version = "1.0.2" + regions = ["europe-west"] single_zone_per_region = false } @@ -60,14 +60,14 @@ resource "google_compute_instance" "example" { } ``` -### Add a single zone from each region in US and Europe that laos has GPUs +### Add a single zone from each region in US and Europe that has GPUs ```hcl module "gcp_region" { - source = "registry.coder.com/modules/gcp-region/coder" - version = "1.0.1" - regions = ["us", "europe"] - gpu_only = true + source = "registry.coder.com/modules/gcp-region/coder" + version = "1.0.2" + regions = ["us", "europe"] + gpu_only = true single_zone_per_region = true } diff --git a/git-clone/README.md b/git-clone/README.md index a7df5315..ea5fe671 100644 --- a/git-clone/README.md +++ b/git-clone/README.md @@ -13,10 +13,10 @@ This module allows you to automatically clone a repository by URL and skip if it ```hcl module "git-clone" { - source = "registry.coder.com/modules/git-clone/coder" - version = "1.0.1" + source = "registry.coder.com/modules/git-clone/coder" + version = "1.0.2" agent_id = coder_agent.example.id - url = "https://github.com/coder/coder" + url = "https://github.com/coder/coder" } ``` @@ -34,8 +34,8 @@ data "coder_git_auth" "github" { ```hcl module "git-clone" { - source = "registry.coder.com/modules/git-clone/coder" - version = "1.0.1" + source = "registry.coder.com/modules/git-clone/coder" + version = "1.0.2" agent_id = coder_agent.example.id url = "https://github.com/coder/coder" base_dir = "~/projects/coder" diff --git a/git-commit-signing/README.md b/git-commit-signing/README.md index 44998396..c27ce670 100644 --- a/git-commit-signing/README.md +++ b/git-commit-signing/README.md @@ -18,8 +18,8 @@ This module has a chance of conflicting with the user's dotfiles / the personali ```hcl module "git-commit-signing" { - source = "registry.coder.com/modules/git-commit-signing/coder" - version = "1.0.1" + source = "registry.coder.com/modules/git-commit-signing/coder" + version = "1.0.2" agent_id = coder_agent.example.id } ``` diff --git a/git-config/README.md b/git-config/README.md index 5a94a614..1e06c89d 100644 --- a/git-config/README.md +++ b/git-config/README.md @@ -13,8 +13,8 @@ Runs a script that updates git credentials in the workspace to match the user's ```hcl module "git-config" { - source = "registry.coder.com/modules/git-config/coder" - version = "1.0.1" + source = "registry.coder.com/modules/git-config/coder" + version = "1.0.2" agent_id = coder_agent.example.id } ``` @@ -27,9 +27,9 @@ TODO: Add screenshot ```hcl module "git-config" { - source = "registry.coder.com/modules/git-config/coder" - version = "1.0.1" - agent_id = coder_agent.example.id + source = "registry.coder.com/modules/git-config/coder" + version = "1.0.2" + agent_id = coder_agent.example.id allow_email_change = true } ``` @@ -40,12 +40,10 @@ TODO: Add screenshot ```hcl module "git-config" { - source = "registry.coder.com/modules/git-config/coder" - version = "1.0.1" - agent_id = coder_agent.example.id + source = "registry.coder.com/modules/git-config/coder" + version = "1.0.2" + agent_id = coder_agent.example.id allow_username_change = false - allow_email_change = false + allow_email_change = false } ``` - -TODO: Add screenshot diff --git a/jetbrains-gateway/README.md b/jetbrains-gateway/README.md index 0311aae8..9193089c 100644 --- a/jetbrains-gateway/README.md +++ b/jetbrains-gateway/README.md @@ -13,12 +13,12 @@ This module adds a JetBrains Gateway Button to open any workspace with a single ```hcl module "jetbrains_gateway" { - source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.1" - agent_id = coder_agent.example.id - folder = "/home/coder/example" + source = "registry.coder.com/modules/jetbrains-gateway/coder" + version = "1.0.2" + agent_id = coder_agent.example.id + folder = "/home/coder/example" jetbrains_ides = ["GO", "WS", "IU", "PY", "PS", "CL", "RM"] - default = "PY" + default = "PY" } ``` @@ -30,12 +30,12 @@ module "jetbrains_gateway" { ```hcl module "jetbrains_gateway" { - source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.1" - agent_id = coder_agent.example.id - folder = "/home/coder/example" + source = "registry.coder.com/modules/jetbrains-gateway/coder" + version = "1.0.2" + agent_id = coder_agent.example.id + folder = "/home/coder/example" jetbrains_ides = ["GO", "WS"] - default = "GO" + default = "GO" } ``` diff --git a/jfrog-oauth/README.md b/jfrog-oauth/README.md index 3daeda90..a281318f 100644 --- a/jfrog-oauth/README.md +++ b/jfrog-oauth/README.md @@ -16,11 +16,12 @@ Install the JF CLI and authenticate package managers with Artifactory using OAut ```hcl module "jfrog" { - source = "registry.coder.com/modules/jfrog-oauth/coder" - version = "1.0.1" - agent_id = coder_agent.example.id - jfrog_url = "https://example.jfrog.io" + source = "registry.coder.com/modules/jfrog-oauth/coder" + version = "1.0.2" + agent_id = coder_agent.example.id + jfrog_url = "https://example.jfrog.io" username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username" + package_managers = { "npm": "npm", "go": "go", @@ -42,11 +43,12 @@ Configure the Python pip package manager to fetch packages from Artifactory whil ```hcl module "jfrog" { - source = "registry.coder.com/modules/jfrog-oauth/coder" - version = "1.0.1" - agent_id = coder_agent.example.id - jfrog_url = "https://example.jfrog.io" + source = "registry.coder.com/modules/jfrog-oauth/coder" + version = "1.0.2" + agent_id = coder_agent.example.id + jfrog_url = "https://example.jfrog.io" username_field = "email" + package_managers = { "pypi": "pypi" } @@ -69,12 +71,13 @@ The [JFrog extension](https://open-vsx.org/extension/JFrog/jfrog-vscode-extensio ```hcl module "jfrog" { - source = "registry.coder.com/modules/jfrog-oauth/coder" - version = "1.0.1" - agent_id = coder_agent.example.id - jfrog_url = "https://example.jfrog.io" - username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username" + source = "registry.coder.com/modules/jfrog-oauth/coder" + version = "1.0.2" + agent_id = coder_agent.example.id + jfrog_url = "https://example.jfrog.io" + username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username" configure_code_server = true # Add JFrog extension configuration for code-server + package_managers = { "npm": "npm", "go": "go", @@ -91,7 +94,7 @@ JFrog Access token is also available as a terraform output. You can use it in ot provider "docker" { ... registry_auth { - address = "https://example.jfrog.io/artifactory/api/docker/REPO-KEY" + address = "https://example.jfrog.io/artifactory/api/docker/REPO-KEY" username = module.jfrog.username password = module.jfrog.access_token } diff --git a/jfrog-token/README.md b/jfrog-token/README.md index b49a3138..112180df 100644 --- a/jfrog-token/README.md +++ b/jfrog-token/README.md @@ -15,7 +15,7 @@ Install the JF CLI and authenticate package managers with Artifactory using Arti ```hcl module "jfrog" { source = "registry.coder.com/modules/jfrog-token/coder" - version = "1.0.1" + version = "1.0.2" agent_id = coder_agent.example.id jfrog_url = "https://XXXX.jfrog.io" artifactory_access_token = var.artifactory_access_token @@ -40,11 +40,12 @@ For detailed instructions, please see this [guide](https://coder.com/docs/v2/lat ```hcl module "jfrog" { - source = "registry.coder.com/modules/jfrog-token/coder" - version = "1.0.1" - agent_id = coder_agent.example.id - jfrog_url = "https://YYYY.jfrog.io" - artifactory_access_token = var.artifactory_access_token # An admin access token + source = "registry.coder.com/modules/jfrog-token/coder" + version = "1.0.2" + agent_id = coder_agent.example.id + jfrog_url = "https://example.jfrog.io" + artifactory_access_token = var.artifactory_access_token + package_managers = { "npm": "npm-local", "go": "go-local", @@ -73,12 +74,13 @@ The [JFrog extension](https://open-vsx.org/extension/JFrog/jfrog-vscode-extensio ```hcl module "jfrog" { - source = "registry.coder.com/modules/jfrog-token/coder" - version = "1.0.1" - agent_id = coder_agent.example.id - jfrog_url = "https://XXXX.jfrog.io" + source = "registry.coder.com/modules/jfrog-token/coder" + version = "1.0.2" + agent_id = coder_agent.example.id + jfrog_url = "https://example.jfrog.io" artifactory_access_token = var.artifactory_access_token - configure_code_server = true # Add JFrog extension configuration for code-server + configure_code_server = true # Add JFrog extension configuration for code-server + package_managers = { "npm": "npm", "go": "go", @@ -96,9 +98,11 @@ JFrog Access token is also available as a terraform output. You can use it in ot provider "docker" { ... registry_auth { - address = "https://YYYY.jfrog.io/artifactory/api/docker/REPO-KEY" + address = "https://YYYY.jfrog.io/artifactory/api/docker/REPO-KEY" username = module.jfrog.username password = module.jfrog.access_token } } ``` + +> Here `REPO_KEY` is the name of docker repository in Artifactory. diff --git a/jupyter-notebook/README.md b/jupyter-notebook/README.md index 830b19a4..bda85459 100644 --- a/jupyter-notebook/README.md +++ b/jupyter-notebook/README.md @@ -15,8 +15,8 @@ A module that adds Jupyter Notebook in your Coder template. ```hcl module "jupyter-notebook" { - source = "registry.coder.com/modules/jupyter-notebook/coder" - version = "1.0.1" + source = "registry.coder.com/modules/jupyter-notebook/coder" + version = "1.0.2" agent_id = coder_agent.example.id } ``` diff --git a/jupyterlab/README.md b/jupyterlab/README.md index 80046b5b..693127da 100644 --- a/jupyterlab/README.md +++ b/jupyterlab/README.md @@ -15,8 +15,8 @@ A module that adds JupyterLab in your Coder template. ```hcl module "jupyterlab" { - source = "registry.coder.com/modules/jupyterlab/coder" - version = "1.0.1" + source = "registry.coder.com/modules/jupyterlab/coder" + version = "1.0.2" agent_id = coder_agent.example.id } ``` diff --git a/package.json b/package.json index a8778dc3..5822c4cc 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "fmt": "bun x prettier --plugin prettier-plugin-sh -w **/*.sh .sample/run.sh new.sh **/*.ts **/*.md *.md && terraform fmt **/*.tf .sample/main.tf", "fmt:ci": "bun x prettier --plugin prettier-plugin-sh --check **/*.sh .sample/run.sh new.sh **/*.ts **/*.md *.md && terraform fmt -check **/*.tf .sample/main.tf", "lint": "bun run lint.ts", - "update-version": "LATEST_TAG=$(git describe --abbrev=0 --tags | sed 's/^v//') && find . -name 'README.md' -exec sed -i \"s/\\( version \\s*=\\s*\\\"\\)[0-9]*\\.[0-9]*\\.[0-9]*\\(\\\"\\)/\\1$LATEST_TAG\\2/g\" {} \\;" + "update-version": "sh update-version.sh" }, "devDependencies": { "bun-types": "^1.0.18", diff --git a/personalize/README.md b/personalize/README.md index 322a3eb4..8c98980c 100644 --- a/personalize/README.md +++ b/personalize/README.md @@ -13,8 +13,8 @@ Run a script on workspace start that allows developers to run custom commands to ```hcl module "personalize" { - source = "registry.coder.com/modules/personalize/coder" - version = "1.0.1" + source = "registry.coder.com/modules/personalize/coder" + version = "1.0.2" agent_id = coder_agent.example.id } ``` diff --git a/slackme/README.md b/slackme/README.md index 26a38cca..9194802b 100644 --- a/slackme/README.md +++ b/slackme/README.md @@ -56,9 +56,9 @@ slackme npm run long-build ```hcl module "slackme" { - source = "registry.coder.com/modules/slackme/coder" - version = "1.0.1" - agent_id = coder_agent.example.id + source = "registry.coder.com/modules/slackme/coder" + version = "1.0.2" + agent_id = coder_agent.example.id auth_provider_id = "slack" } ``` @@ -72,11 +72,11 @@ slackme npm run long-build ```hcl module "slackme" { - source = "registry.coder.com/modules/slackme/coder" - version = "1.0.1" - agent_id = coder_agent.example.id + source = "registry.coder.com/modules/slackme/coder" + version = "1.0.2" + agent_id = coder_agent.example.id auth_provider_id = "slack" - slack_message = < tmpfile && mv tmpfile "$file" +done \ No newline at end of file diff --git a/vault-github/README.md b/vault-github/README.md index 6f399c8d..bc788908 100644 --- a/vault-github/README.md +++ b/vault-github/README.md @@ -13,9 +13,9 @@ This module lets you authenticate with [Hashicorp Vault](https://www.vaultprojec ```hcl module "vault" { - source = "registry.coder.com/modules/vault-github/coder" - version = "1.0.1" - agent_id = coder_agent.example.id + source = "registry.coder.com/modules/vault-github/coder" + version = "1.0.2" + agent_id = coder_agent.example.id vault_addr = "https://vault.example.com" } ``` @@ -23,7 +23,7 @@ module "vault" { Then you can use the Vault CLI in your workspaces to fetch secrets from Vault: ```shell -vault kv get -mount = secret my-secret +vault kv get -mount=secret my-secret ``` or using the Vault API: @@ -44,10 +44,10 @@ To configure the Vault module, you must set up a Vault GitHub auth method. See t ```hcl module "vault" { - source = "registry.coder.com/modules/vault-github/coder" - version = "1.0.1" - agent_id = coder_agent.example.id - vault_addr = "https://vault.example.com" + source = "registry.coder.com/modules/vault-github/coder" + version = "1.0.2" + agent_id = coder_agent.example.id + vault_addr = "https://vault.example.com" coder_github_auth_id = "my-github-auth-id" } ``` @@ -56,11 +56,11 @@ module "vault" { ```hcl module "vault" { - source = "registry.coder.com/modules/vault-github/coder" - version = "1.0.1" - agent_id = coder_agent.example.id - vault_addr = "https://vault.example.com" - coder_github_auth_id = "my-github-auth-id" + source = "registry.coder.com/modules/vault-github/coder" + version = "1.0.2" + agent_id = coder_agent.example.id + vault_addr = "https://vault.example.com" + coder_github_auth_id = "my-github-auth-id" vault_github_auth_path = "my-github-auth-path" } ``` @@ -69,10 +69,10 @@ module "vault" { ```hcl module "vault" { - source = "registry.coder.com/modules/vault-github/coder" - version = "1.0.1" - agent_id = coder_agent.example.id - vault_addr = "https://vault.example.com" + source = "registry.coder.com/modules/vault-github/coder" + version = "1.0.2" + agent_id = coder_agent.example.id + vault_addr = "https://vault.example.com" vault_cli_version = "1.15.0" } ``` diff --git a/vscode-desktop/README.md b/vscode-desktop/README.md index 75b4d62b..b5b0f299 100644 --- a/vscode-desktop/README.md +++ b/vscode-desktop/README.md @@ -15,8 +15,8 @@ Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder) ```hcl module "vscode" { - source = "registry.coder.com/modules/vscode-desktop/coder" - version = "1.0.1" + source = "registry.coder.com/modules/vscode-desktop/coder" + version = "1.0.2" agent_id = coder_agent.example.id } ``` @@ -27,9 +27,9 @@ module "vscode" { ```hcl module "vscode" { - source = "registry.coder.com/modules/vscode-desktop/coder" - version = "1.0.1" + source = "registry.coder.com/modules/vscode-desktop/coder" + version = "1.0.2" agent_id = coder_agent.example.id - folder = "/home/coder/project" + folder = "/home/coder/project" } ``` diff --git a/vscode-web/README.md b/vscode-web/README.md index 71969fd1..d2af3ea0 100644 --- a/vscode-web/README.md +++ b/vscode-web/README.md @@ -13,9 +13,9 @@ Automatically install [Visual Studio Code Server](https://code.visualstudio.com/ ```hcl module "vscode-web" { - source = "registry.coder.com/modules/vscode-web/coder" - version = "1.0.1" - agent_id = coder_agent.example.id + source = "registry.coder.com/modules/vscode-web/coder" + version = "1.0.2" + agent_id = coder_agent.example.id accept_license = true } ``` @@ -28,11 +28,11 @@ module "vscode-web" { ```hcl module "vscode-web" { - source = "registry.coder.com/modules/vscode-web/coder" - version = "1.0.1" - agent_id = coder_agent.example.id - install_dir = "/home/coder/.vscode-web" - folder = "/home/coder" + source = "registry.coder.com/modules/vscode-web/coder" + version = "1.0.2" + agent_id = coder_agent.example.id + install_dir = "/home/coder/.vscode-web" + folder = "/home/coder" accept_license = true } ``` From 6c023c03682b3ab81bd9e30fc340b8e26737fb77 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Sat, 27 Jan 2024 16:20:04 +0300 Subject: [PATCH 05/12] bump version --- README.md | 2 +- aws-region/README.md | 6 +++--- azure-region/README.md | 6 +++--- bun.lockb | Bin 8997 -> 9463 bytes code-server/README.md | 10 +++++----- dotfiles/README.md | 2 +- exoscale-instance-type/README.md | 4 ++-- exoscale-zone/README.md | 6 +++--- filebrowser/README.md | 6 +++--- fly-region/README.md | 6 +++--- git-commit-signing/README.md | 2 +- git-config/README.md | 6 +++--- jetbrains-gateway/README.md | 2 +- jfrog-oauth/README.md | 6 +++--- jfrog-token/README.md | 6 +++--- jupyter-notebook/README.md | 2 +- jupyterlab/README.md | 2 +- package.json | 3 ++- personalize/README.md | 2 +- slackme/README.md | 4 ++-- vscode-desktop/README.md | 4 ++-- vscode-web/README.md | 2 +- 22 files changed, 45 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 9cf14e88..4b675946 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ e.g. ```tf module "code-server" { source = "registry.coder.com/modules/code-server/coder" - version = "1.0.0" + version = "1.0.2" agent_id = coder_agent.main.id } ``` diff --git a/aws-region/README.md b/aws-region/README.md index 961c639c..bcea6d73 100644 --- a/aws-region/README.md +++ b/aws-region/README.md @@ -17,7 +17,7 @@ Customize the preselected parameter value: ```tf module "aws-region" { source = "registry.coder.com/modules/aws-region/coder" - version = "1.0.0" + version = "1.0.2" default = "us-east-1" } @@ -37,7 +37,7 @@ Change the display name and icon for a region using the corresponding maps: ```tf module "aws-region" { source = "registry.coder.com/modules/aws-region/coder" - version = "1.0.0" + version = "1.0.2" default = "ap-south-1" custom_names = { @@ -63,7 +63,7 @@ Hide the Asia Pacific regions Seoul and Osaka: ```tf module "aws-region" { source = "registry.coder.com/modules/aws-region/coder" - version = "1.0.0" + version = "1.0.2" exclude = ["ap-northeast-2", "ap-northeast-3"] } diff --git a/azure-region/README.md b/azure-region/README.md index 1f20cee4..d88a2e9b 100644 --- a/azure-region/README.md +++ b/azure-region/README.md @@ -14,7 +14,7 @@ This module adds a parameter with all Azure regions, allowing developers to sele ```tf module "azure_region" { source = "registry.coder.com/modules/azure-region/coder" - version = "1.0.0" + version = "1.0.2" default = "eastus" } @@ -34,7 +34,7 @@ Change the display name and icon for a region using the corresponding maps: ```tf module "azure-region" { source = "registry.coder.com/modules/azure-region/coder" - version = "1.0.0" + version = "1.0.2" custom_names = { "australia" : "Go Australia!" } @@ -57,7 +57,7 @@ Hide all regions in Australia except australiacentral: ```tf module "azure-region" { source = "registry.coder.com/modules/azure-region/coder" - version = "1.0.0" + version = "1.0.2" exclude = [ "australia", "australiacentral2", diff --git a/bun.lockb b/bun.lockb index 7b18be00a743060d7fcceedd731e857224f0a476..d7e77b2aa30552796d6059a6ed6b0506257575ca 100755 GIT binary patch delta 1826 zcmbtUZA_b06n^jR2fT$B%3!vXZj3=@bhc~jC?B%7h~OY~%9x=u2$R|JC52L8lP-ax z`=K*khQ}YsFiSN1Fl7GN)bOQ9G`b1IU^L?7hi=oMa~j1&aASH-X%iFo!-SLG_vv%) zx%ZrN@44sX!+(|?Gv8wm)lArmf6r{28@@k%@zSY~-Q@pm`f62b*&n`Z>PwsJvxKnd z`&{Yw9gvdJ2K;uRK5g$t#21T}|$b z*Jd;7Oi;*{q&+y^9BZ^TxPGsGIy{qAWz}o1`Yv* z%pc=0s*u?bEGrzUMU1%^Rum72B^a$8_f*5AB8MMRz^GCdr%_piN&$LNX;ebKN*05d z3Rx;)Qklcvg%OoQTt;01>R5PnwhHpqGC!t*fLdm=Frs#Fl^Xs+oveoZ7@5DMhCoby zj~Wx8L5alRKzEdNSO`gvrxKPsA$k=OBlCoqjgS=KgtQ(nEG&dHpR!5`d%_0mBML$a zAbS0Tv_WbF4TvOBr2lJ6phpnan8Df-fDEy@@a+7T*UOu4?Y#TMSkQTM>WAye`=%e? z``PIS7iLU@-uaL_tGlx7@<#)2P3^zo)AVX}KaW+cv>6s>yQ{y?_~re#VMf$LNOUp< zd@Z`*1&stdG)|_17d0-(jg#O8vKYvVbHM_#*W#Q^gddUh$4js)-pS(N)p!?_N)oIf zlb}p;!4k5wl9MIEGO{xX5>zKRSrWXN;DWu05=epNp*8o(lQ;Eik7`sleA8HX{=q4k}iB-hzY!dqTLlV-fMGhYKu`FGWN#Qt46kP|1>eazk!uOL9Z*iBkyJp2F_P z4P`?vDFpgYAumPT4jPf5XbP%q_UcafN`JgO+Wev&D3;Y&%{DV0Rg$*NLXj8#%i- zoQEJp`>fbn@bOQ(2gcAtw%KMkZ;vd^`maHE#9$$E7!4bsDXqxnY4_Fo+daZ`kvw{H zXVnLL@bIbaUpR8^)`#W0Pd$ws&pvpiYyU*g5Y*4zml*IF(OeHLCruCEH?|Xkf5ZNCDHw>6v{}gbKbs*{^*a04qSfk zciz4CoO`~0&Aq#Hcj|%W{iPFSJQyFKb{!A{{8%$$1m)&UuyzS z>POw#a~IW56Mzl){~jna>-&F?;a}6~G`u3v|LM;x&X5gv_rHhX1B#)4YFj``J%kePhcYc8S{}jl(i4 zUk4nQj{E}9P#h7$oRSp_aahU9iokKjktYQjsw3iQ%@){|5r;2f{RoJKpvidr5u$^?mJAFXKk$@wAQE@!r zh*s2tS=p!IvY;d1(Qt&|XAQ@L3%6?Y4qkL4glMraQmpvhp8OM%H8B1EjO05+ea^_| zDd?Us@_$N=Cye~R4q&UNpbyW1`#c7~$QwApj211HD)RULm=RU-0i7$3eY} zON>0W873Yy@K4}O#Fyg6!oZ!p{R))qIoK>)5J~@YmDVZ9TsCQJ{L3bb7C{G zA?~6TH*qN5hl{29N^K~#lODr;fsnxjsyetO@gS5De z;(xYYQ@9=|lsdDnVX#YM#1`6yq(-c&1{tFcR~wM`Te{Yt?^qm%fN!pAdlM_cnHu{m Date: Sat, 27 Jan 2024 16:44:42 +0300 Subject: [PATCH 06/12] add linting --- git-clone/README.md | 21 +++++++++++++++------ lint.ts | 17 +++++++---------- vscode-web/README.md | 2 +- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/git-clone/README.md b/git-clone/README.md index e883bd47..054e30c1 100644 --- a/git-clone/README.md +++ b/git-clone/README.md @@ -20,17 +20,23 @@ module "git-clone" { } ``` -To use with [Git Authentication](https://coder.com/docs/v2/latest/admin/git-providers), add the provider by ID to your template: +## Examples + +### Custom Path ```tf -data "coder_git_auth" "github" { - id = "github" +module "git-clone" { + source = "registry.coder.com/modules/git-clone/coder" + version = "1.0.2" + agent_id = coder_agent.example.id + url = "https://github.com/coder/coder" + base_dir = "~/projects/coder" } ``` -## Examples +### Git Authentication -### Custom Path +To use with [Git Authentication](https://coder.com/docs/v2/latest/admin/git-providers), add the provider by ID to your template: ```tf module "git-clone" { @@ -38,6 +44,9 @@ module "git-clone" { version = "1.0.2" agent_id = coder_agent.example.id url = "https://github.com/coder/coder" - base_dir = "~/projects/coder" +} + +data "coder_git_auth" "github" { + id = "github" } ``` diff --git a/lint.ts b/lint.ts index 2328b487..01c2afdd 100644 --- a/lint.ts +++ b/lint.ts @@ -62,7 +62,7 @@ for (const dir of dirs) { let h1 = false; let code = false; let paragraph = false; - let version = false; + let version = true; for (const token of tokens) { if (token.type === "heading" && token.depth === 1) { @@ -78,15 +78,12 @@ for (const dir of dirs) { } if (token.type === "code") { code = true; - if (token.lang !== "hcl") { - version = true; - continue; + if (token.lang === "tf" && !token.text.includes("version")) { + version = false; + error(dir.name, "missing version in tf code block"); } - let text = token.text; - // check if text contains version - if (text.includes("version")) { - version = true; - continue; + if (token.lang === "hcl") { + error(dir.name, "HCL code blocks are not allowed, use tf"); } continue; } @@ -101,7 +98,7 @@ for (const dir of dirs) { error(dir.name, "missing example code block after paragraph"); } if (!version) { - error(dir.name, "missing version in code block"); + error(dir.name, "missing version in tf code block"); } } diff --git a/vscode-web/README.md b/vscode-web/README.md index 55b12efa..64aeec01 100644 --- a/vscode-web/README.md +++ b/vscode-web/README.md @@ -26,7 +26,7 @@ module "vscode-web" { ### Install VS Code Web to a custom folder -```tf +```hcl module "vscode-web" { source = "registry.coder.com/modules/vscode-web/coder" version = "1.0.2" From c9487c52db163cd92365040c8b6ff458438fb752 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Sun, 28 Jan 2024 01:06:12 +0300 Subject: [PATCH 07/12] testing --- vscode-web/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/README.md b/vscode-web/README.md index 64aeec01..55b12efa 100644 --- a/vscode-web/README.md +++ b/vscode-web/README.md @@ -26,7 +26,7 @@ module "vscode-web" { ### Install VS Code Web to a custom folder -```hcl +```tf module "vscode-web" { source = "registry.coder.com/modules/vscode-web/coder" version = "1.0.2" From 204ac6838a72ffab7421f6baaaf49b744b94b105 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 30 Jan 2024 16:09:58 +0300 Subject: [PATCH 08/12] Update update-version.sh Co-authored-by: Mathias Fredriksson --- update-version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-version.sh b/update-version.sh index b0aa1324..d00047e2 100755 --- a/update-version.sh +++ b/update-version.sh @@ -1,5 +1,5 @@ #/usr/bin/env bash - +set -euo pipefail # This script updates the version number in the README.md files of all modules # to the latest tag in the repository. It is intended to be run from the root # of the repository or by using the `bun update-version` command. From c84bc2da63a85e7474c0b6ef04123dda2f1769f1 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 30 Jan 2024 16:10:08 +0300 Subject: [PATCH 09/12] Update package.json Co-authored-by: Mathias Fredriksson --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 56cc77d4..bab18d33 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "fmt": "bun x prettier -w **/*.sh .sample/run.sh new.sh **/*.ts **/*.md *.md && terraform fmt **/*.tf .sample/main.tf", "fmt:ci": "bun x prettier --check **/*.sh .sample/run.sh new.sh **/*.ts **/*.md *.md && terraform fmt -check **/*.tf .sample/main.tf", "lint": "bun run lint.ts", - "update-version": "sh update-version.sh" + "update-version": "./update-version.sh" }, "devDependencies": { "bun-types": "^1.0.18", From f18ee394aa000686e1e609838d6ba38cff071de4 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 30 Jan 2024 16:10:17 +0300 Subject: [PATCH 10/12] Update update-version.sh Co-authored-by: Mathias Fredriksson --- update-version.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/update-version.sh b/update-version.sh index d00047e2..04f931b4 100755 --- a/update-version.sh +++ b/update-version.sh @@ -10,9 +10,7 @@ find . -name README.md | while read -r file; do awk -v tag="$LATEST_TAG" '{ if ($1 == "version" && $2 == "=") { sub(/"[^"]*"/, "\"" tag "\"") - print - } else { - print } + print }' "$file" > tmpfile && mv tmpfile "$file" done \ No newline at end of file From 3e83b947849336ab658e2ab3527bce4b47d268ac Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 30 Jan 2024 16:16:02 +0300 Subject: [PATCH 11/12] Update update-version.sh --- update-version.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/update-version.sh b/update-version.sh index 04f931b4..d2e50196 100755 --- a/update-version.sh +++ b/update-version.sh @@ -1,16 +1,21 @@ #/usr/bin/env bash -set -euo pipefail + # This script updates the version number in the README.md files of all modules # to the latest tag in the repository. It is intended to be run from the root # of the repository or by using the `bun update-version` command. +set -euo pipefail + LATEST_TAG=$(git describe --abbrev=0 --tags | sed 's/^v//') || exit $? find . -name README.md | while read -r file; do + tmpfile=$(mktemp /tmp/tempfile.XXXXXX) awk -v tag="$LATEST_TAG" '{ if ($1 == "version" && $2 == "=") { sub(/"[^"]*"/, "\"" tag "\"") + print + } else { + print } - print - }' "$file" > tmpfile && mv tmpfile "$file" -done \ No newline at end of file + }' "$file" > "$tmpfile" && mv "$tmpfile" "$file" +done From 5dccb7dc0b3685ce2c2abdb09b0c210f744dc0c2 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 30 Jan 2024 17:49:31 +0300 Subject: [PATCH 12/12] fmt an fix --- update-version.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/update-version.sh b/update-version.sh index d2e50196..2fadb577 100755 --- a/update-version.sh +++ b/update-version.sh @@ -1,4 +1,4 @@ -#/usr/bin/env bash +#!/usr/bin/env bash # This script updates the version number in the README.md files of all modules # to the latest tag in the repository. It is intended to be run from the root @@ -9,13 +9,13 @@ set -euo pipefail LATEST_TAG=$(git describe --abbrev=0 --tags | sed 's/^v//') || exit $? find . -name README.md | while read -r file; do - tmpfile=$(mktemp /tmp/tempfile.XXXXXX) - awk -v tag="$LATEST_TAG" '{ - if ($1 == "version" && $2 == "=") { - sub(/"[^"]*"/, "\"" tag "\"") - print - } else { - print - } - }' "$file" > "$tmpfile" && mv "$tmpfile" "$file" + tmpfile=$(mktemp /tmp/tempfile.XXXXXX) + awk -v tag="$LATEST_TAG" '{ + if ($1 == "version" && $2 == "=") { + sub(/"[^"]*"/, "\"" tag "\"") + print + } else { + print + } + }' "$file" > "$tmpfile" && mv "$tmpfile" "$file" done