From 0259d75055db9e6b15ce467104b7257a9c4878fb Mon Sep 17 00:00:00 2001
From: Timo Furrer <tfurrer@gitlab.com>
Date: Thu, 18 Jan 2024 19:53:47 +0100
Subject: [PATCH] hack options

---
 .gitlab-ci.yml | 2 +-
 Makefile       | 2 +-
 README.md      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6de90a5..23830f7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -141,7 +141,7 @@ create-release:
     - apk add --update yq envsubst
   script: 
     - echo "Creating release $CI_COMMIT_TAG"
-    - AVAILABLE_OPENTOFU_VERSIONS=$(yq -r '.spec.inputs.opentofu_version.options | .[] | "- [`" + . + "`](https://github.com/opentofu/opentofu/releases/tag/v" + . + ")"' templates/full-pipeline.yml)
+    - AVAILABLE_OPENTOFU_VERSIONS=$(yq -r '.spec.inputs.opentofu_version.options | filter((. | test("\$.*")) == false) | .[] | "- [`" + . + "`](https://github.com/opentofu/opentofu/releases/tag/v" + . + ")"' templates/full-pipeline.yml)
     - export AVAILABLE_OPENTOFU_VERSIONS
     - cat .gitlab/release-template.md | envsubst > release-notes.md 
   release:
diff --git a/Makefile b/Makefile
index bd7973e..2e458d2 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ docs:
 	echo '<!-- This document is generated by `make docs` from `.gitlab/README.md` -->' > README.md
 	echo >> README.md
 	cat readme0 >> README.md
-	yq '.spec.inputs | .[] | "| `" + key + "` | `" + .default + "` | " + .description + (.options | (" Must be one of " + (. | map("`" + . + "`") | join(", ") + "." )) // "") + " |"' templates/full-pipeline.yml >> README.md
+	yq '.spec.inputs | .[] | "| `" + key + "` | `" + .default + "` | " + .description + (.options | (" Must be one of " + (. | filter((. | test("\$$.*")) == false) | map("`" + . + "`") | join(", ") + "." )) // "") + " |"' templates/full-pipeline.yml >> README.md
 	echo >> README.md
 	echo '### Available OpenTofu Versions' >> README.md
 	echo >> README.md
diff --git a/README.md b/README.md
index 80bb505..6a861fa 100644
--- a/README.md
+++ b/README.md
@@ -76,7 +76,7 @@ stages: [validate, test, build, deploy, cleanup]
 | `stage_deploy` | `deploy` | Defines the deploy stage. This stage includes the `apply` job. |
 | `stage_cleanup` | `cleanup` | Defines the cleanup stage. This stage includes the `destroy` and `delete-state` jobs. |
 | `version` | `latest` | Version of this component. Has to be the same as the one in the component include entry. |
-| `opentofu_version` | `1.6.0` | OpenTofu version that should be used. Must be one of `$OPENTOFU_VERSION`, `1.6.0`, `1.6.0-rc1`. |
+| `opentofu_version` | `1.6.0` | OpenTofu version that should be used. Must be one of `1.6.0`, `1.6.0-rc1`. |
 | `root_dir` | `${CI_PROJECT_DIR}` | Root directory for the OpenTofu project. |
 | `state_name` | `default` | Remote OpenTofu state name. |
 | `auto_apply` | `false` | Whether the apply job is manual or automatically run. |
-- 
GitLab