chore: bump version to 1.0.2 and add script to update them automatically. (#128)

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
pull/146/head
Muhammad Atif Ali 1 year ago committed by GitHub
parent f16d7ca3f5
commit acab6437bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -13,8 +13,8 @@ tags: [helper]
```tf
module "MODULE_NAME" {
source = "registry.coder.com/modules/MODULE_NAME/coder"
version = "1.0.0"
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/):
```tf
module "MODULE_NAME" {
source = "registry.coder.com/modules/MODULE_NAME/coder"
version = "1.0.0"
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
```tf
module "MODULE_NAME" {
source = "registry.coder.com/modules/MODULE_NAME/coder"
version = "1.0.0"
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:
```tf
module "MODULE_NAME" {
source = "registry.coder.com/modules/MODULE_NAME/coder"
version = "1.0.0"
source = "registry.coder.com/modules/MODULE_NAME/coder"
version = "1.0.2"
agent_id = coder_agent.example.id
offline = true
offline = true
}
```

@ -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
}
```

@ -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,11 +37,13 @@ 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 = {
"ap-south-1" : "Awesome Mumbai!"
}
custom_icons = {
"ap-south-1" : "/emojis/1f33a.png"
}
@ -61,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"]
}

@ -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",

Binary file not shown.

@ -14,7 +14,7 @@ Automatically install [code-server](https://github.com/coder/code-server) in a w
```tf
module "code-server" {
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
}
```
@ -28,7 +28,7 @@ module "code-server" {
```tf
module "code-server" {
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
install_version = "4.8.3"
}
@ -41,7 +41,7 @@ Install the Dracula theme from [OpenVSX](https://open-vsx.org/):
```tf
module "code-server" {
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
version = "1.0.2"
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
```tf
module "settings" {
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
version = "1.0.2"
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:
```tf
module "settings" {
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
version = "1.0.2"
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:
```tf
module "settings" {
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
offline = true
}

@ -14,7 +14,7 @@ Automatically logs the user into Coder when creating their workspace.
```tf
module "coder-login" {
source = "registry.coder.com/modules/coder-login/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
}
```

@ -14,7 +14,7 @@ Allow developers to optionally bring their own [dotfiles repository](https://dot
```tf
module "dotfiles" {
source = "registry.coder.com/modules/dotfiles/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
}
```

@ -17,7 +17,7 @@ Customize the preselected parameter value:
```tf
module "exoscale-instance-type" {
source = "registry.coder.com/modules/exoscale-instance-type/coder"
version = "1.0.0"
version = "1.0.2"
default = "standard.medium"
}
@ -45,11 +45,13 @@ Change the display name a type using the corresponding maps:
```tf
module "exoscale-instance-type" {
source = "registry.coder.com/modules/exoscale-instance-type/coder"
version = "1.0.0"
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
}
@ -77,7 +79,7 @@ Show only gpu1 types
```tf
module "exoscale-instance-type" {
source = "registry.coder.com/modules/exoscale-instance-type/coder"
version = "1.0.0"
version = "1.0.2"
default = "gpu.large"
type_category = ["gpu"]
exclude = [

@ -17,7 +17,7 @@ Customize the preselected parameter value:
```tf
module "exoscale-zone" {
source = "registry.coder.com/modules/exoscale-zone/coder"
version = "1.0.0"
version = "1.0.2"
default = "ch-dk-2"
}
@ -44,11 +44,13 @@ Change the display name and icon for a zone using the corresponding maps:
```tf
module "exoscale-zone" {
source = "registry.coder.com/modules/exoscale-zone/coder"
version = "1.0.0"
version = "1.0.2"
default = "at-vie-1"
custom_names = {
"at-vie-1" : "Home Vienna"
}
custom_icons = {
"at-vie-1" : "/emojis/1f3e0.png"
}
@ -74,7 +76,7 @@ Hide the Switzerland zones Geneva and Zurich
```tf
module "exoscale-zone" {
source = "registry.coder.com/modules/exoscale-zone/coder"
version = "1.0.0"
version = "1.0.2"
exclude = ["ch-gva-2", "ch-dk-2"]
}

@ -14,7 +14,7 @@ A file browser for your workspace.
```tf
module "filebrowser" {
source = "registry.coder.com/modules/filebrowser/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
}
```
@ -28,7 +28,7 @@ module "filebrowser" {
```tf
module "filebrowser" {
source = "registry.coder.com/modules/filebrowser/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
folder = "/home/coder/project"
}
@ -39,7 +39,7 @@ module "filebrowser" {
```tf
module "filebrowser" {
source = "registry.coder.com/modules/filebrowser/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
database_path = ".config/filebrowser.db"
}

@ -16,7 +16,7 @@ We can use the simplest format here, only adding a default selection as the `atl
```tf
module "fly-region" {
source = "registry.coder.com/modules/fly-region/coder"
version = "1.0.0"
version = "1.0.2"
default = "atl"
}
```
@ -32,7 +32,7 @@ The regions argument can be used to display only the desired regions in the Code
```tf
module "fly-region" {
source = "registry.coder.com/modules/fly-region/coder"
version = "1.0.0"
version = "1.0.2"
default = "ams"
regions = ["ams", "arn", "atl"]
}
@ -47,11 +47,13 @@ Set custom icons and names with their respective maps.
```tf
module "fly-region" {
source = "registry.coder.com/modules/fly-region/coder"
version = "1.0.0"
version = "1.0.2"
default = "ams"
custom_icons = {
"ams" = "/emojis/1f90e.png"
}
custom_names = {
"ams" = "We love the Netherlands!"
}

@ -14,7 +14,7 @@ This module adds Google Cloud Platform regions to your Coder template.
```tf
module "gcp_region" {
source = "registry.coder.com/modules/gcp-region/coder"
version = "1.0.0"
version = "1.0.2"
regions = ["us", "europe"]
}
@ -34,7 +34,7 @@ Note: setting `gpu_only = true` and using a default region without GPU support,
```tf
module "gcp_region" {
source = "registry.coder.com/modules/gcp-region/coder"
version = "1.0.0"
version = "1.0.2"
default = ["us-west1-a"]
regions = ["us-west1"]
gpu_only = false
@ -50,7 +50,7 @@ resource "google_compute_instance" "example" {
```tf
module "gcp_region" {
source = "registry.coder.com/modules/gcp-region/coder"
version = "1.0.0"
version = "1.0.2"
regions = ["europe-west"]
single_zone_per_region = false
}
@ -60,12 +60,12 @@ 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
```tf
module "gcp_region" {
source = "registry.coder.com/modules/gcp-region/coder"
version = "1.0.0"
version = "1.0.2"
regions = ["us", "europe"]
gpu_only = true
single_zone_per_region = true

@ -14,30 +14,39 @@ This module allows you to automatically clone a repository by URL and skip if it
```tf
module "git-clone" {
source = "registry.coder.com/modules/git-clone/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
url = "https://github.com/coder/coder"
}
```
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" {
source = "registry.coder.com/modules/git-clone/coder"
version = "1.0.0"
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"
}
```

@ -19,7 +19,7 @@ This module has a chance of conflicting with the user's dotfiles / the personali
```tf
module "git-commit-signing" {
source = "registry.coder.com/modules/git-commit-signing/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
}
```

@ -14,7 +14,7 @@ Runs a script that updates git credentials in the workspace to match the user's
```tf
module "git-config" {
source = "registry.coder.com/modules/git-config/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
}
```
@ -28,7 +28,7 @@ TODO: Add screenshot
```tf
module "git-config" {
source = "registry.coder.com/modules/git-config/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
allow_email_change = true
}
@ -41,11 +41,9 @@ TODO: Add screenshot
```tf
module "git-config" {
source = "registry.coder.com/modules/git-config/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
allow_username_change = false
allow_email_change = false
}
```
TODO: Add screenshot

@ -14,7 +14,7 @@ This module adds a JetBrains Gateway Button to open any workspace with a single
```tf
module "jetbrains_gateway" {
source = "registry.coder.com/modules/jetbrains-gateway/coder"
version = "1.0.0"
version = "1.0.2"
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" {
```tf
module "jetbrains_gateway" {
source = "registry.coder.com/modules/jetbrains-gateway/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
folder = "/home/coder/example"
jetbrains_ides = ["GO", "WS"]

@ -17,10 +17,11 @@ Install the JF CLI and authenticate package managers with Artifactory using OAut
```tf
module "jfrog" {
source = "registry.coder.com/modules/jfrog-oauth/coder"
version = "1.0.0"
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",
@ -43,10 +44,11 @@ Configure the Python pip package manager to fetch packages from Artifactory whil
```tf
module "jfrog" {
source = "registry.coder.com/modules/jfrog-oauth/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
jfrog_url = "https://example.jfrog.io"
username_field = "email"
package_managers = {
"pypi" : "pypi"
}
@ -70,7 +72,7 @@ The [JFrog extension](https://open-vsx.org/extension/JFrog/jfrog-vscode-extensio
```tf
module "jfrog" {
source = "registry.coder.com/modules/jfrog-oauth/coder"
version = "1.0.0"
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"

@ -15,7 +15,7 @@ Install the JF CLI and authenticate package managers with Artifactory using Arti
```tf
module "jfrog" {
source = "registry.coder.com/modules/jfrog-token/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
jfrog_url = "https://XXXX.jfrog.io"
artifactory_access_token = var.artifactory_access_token
@ -41,7 +41,7 @@ For detailed instructions, please see this [guide](https://coder.com/docs/v2/lat
```tf
module "jfrog" {
source = "registry.coder.com/modules/jfrog-token/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
jfrog_url = "https://YYYY.jfrog.io"
artifactory_access_token = var.artifactory_access_token # An admin access token
@ -74,7 +74,7 @@ The [JFrog extension](https://open-vsx.org/extension/JFrog/jfrog-vscode-extensio
```tf
module "jfrog" {
source = "registry.coder.com/modules/jfrog-token/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
jfrog_url = "https://XXXX.jfrog.io"
artifactory_access_token = var.artifactory_access_token
@ -102,3 +102,5 @@ provider "docker" {
}
}
```
> Here `REPO_KEY` is the name of docker repository in Artifactory.

@ -16,7 +16,7 @@ A module that adds Jupyter Notebook in your Coder template.
```tf
module "jupyter-notebook" {
source = "registry.coder.com/modules/jupyter-notebook/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
}
```

@ -16,7 +16,7 @@ A module that adds JupyterLab in your Coder template.
```tf
module "jupyterlab" {
source = "registry.coder.com/modules/jupyterlab/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
}
```

@ -92,6 +92,7 @@ for (const dir of dirs) {
let h1 = false;
let code = false;
let paragraph = false;
let version = true;
for (const token of tokens) {
if (token.type === "heading" && token.depth === 1) {
@ -107,6 +108,10 @@ for (const dir of dirs) {
}
if (token.type === "code") {
code = true;
if (token.lang === "tf" && !token.text.includes("version")) {
version = false;
error(dir.name, "missing version in tf code block");
}
continue;
}
}

@ -4,7 +4,8 @@
"test": "bun test",
"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"
"lint": "bun run lint.ts",
"update-version": "./update-version.sh"
},
"devDependencies": {
"bun-types": "^1.0.18",

@ -14,7 +14,7 @@ Run a script on workspace start that allows developers to run custom commands to
```tf
module "personalize" {
source = "registry.coder.com/modules/personalize/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
}
```

@ -57,7 +57,7 @@ slackme npm run long-build
```tf
module "slackme" {
source = "registry.coder.com/modules/slackme/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
auth_provider_id = "slack"
}
@ -73,7 +73,7 @@ slackme npm run long-build
```tf
module "slackme" {
source = "registry.coder.com/modules/slackme/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
auth_provider_id = "slack"
slack_message = <<EOF

@ -0,0 +1,21 @@
#!/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
# 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
}
}' "$file" > "$tmpfile" && mv "$tmpfile" "$file"
done

@ -14,7 +14,7 @@ This module lets you authenticate with [Hashicorp Vault](https://www.vaultprojec
```tf
module "vault" {
source = "registry.coder.com/modules/vault-github/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
vault_addr = "https://vault.example.com"
}
@ -45,7 +45,7 @@ To configure the Vault module, you must set up a Vault GitHub auth method. See t
```tf
module "vault" {
source = "registry.coder.com/modules/vault-github/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
vault_addr = "https://vault.example.com"
coder_github_auth_id = "my-github-auth-id"
@ -57,7 +57,7 @@ module "vault" {
```tf
module "vault" {
source = "registry.coder.com/modules/vault-github/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
vault_addr = "https://vault.example.com"
coder_github_auth_id = "my-github-auth-id"
@ -70,7 +70,7 @@ module "vault" {
```tf
module "vault" {
source = "registry.coder.com/modules/vault-github/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
vault_addr = "https://vault.example.com"
vault_cli_version = "1.15.0"

@ -16,7 +16,7 @@ Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder)
```tf
module "vscode" {
source = "registry.coder.com/modules/vscode-desktop/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
}
```
@ -28,7 +28,7 @@ module "vscode" {
```tf
module "vscode" {
source = "registry.coder.com/modules/vscode-desktop/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
folder = "/home/coder/project"
}

@ -14,7 +14,7 @@ Automatically install [Visual Studio Code Server](https://code.visualstudio.com/
```tf
module "vscode-web" {
source = "registry.coder.com/modules/vscode-web/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
accept_license = true
}
@ -29,7 +29,7 @@ module "vscode-web" {
```tf
module "vscode-web" {
source = "registry.coder.com/modules/vscode-web/coder"
version = "1.0.0"
version = "1.0.2"
agent_id = coder_agent.example.id
install_dir = "/home/coder/.vscode-web"
folder = "/home/coder"

Loading…
Cancel
Save