Skip to content

Commit 71ac202

Browse files
Enhancing Terraform Feature Stability (devcontainers#657)
* Added fallback method to retrieve cosign version * Update src/terraform/install.sh Co-authored-by: Samruddhi Khandale <samruddhikhandale@github.com> * Remove get_cosign_latest_version function --------- Co-authored-by: Samruddhi Khandale <samruddhikhandale@github.com>
1 parent a4b31f3 commit 71ac202

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/terraform/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "terraform",
3-
"version": "1.3.3",
3+
"version": "1.3.4",
44
"name": "Terraform, tflint, and TFGrunt",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/terraform",
66
"description": "Installs the Terraform CLI and optionally TFLint and Terragrunt. Auto-detects latest version and installs needed dependencies.",

src/terraform/install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ ensure_cosign() {
165165

166166
if ! type cosign > /dev/null 2>&1; then
167167
echo "Installing cosign..."
168-
local LATEST_COSIGN_VERSION=$(curl https://api.github.com/repos/sigstore/cosign/releases/latest | grep tag_name | cut -d : -f2 | tr -d "v\", ")
168+
LATEST_COSIGN_VERSION="latest"
169+
find_version_from_git_tags LATEST_COSIGN_VERSION 'https://github.com/sigstore/cosign'
169170
curl -L "https://github.com/sigstore/cosign/releases/latest/download/cosign_${LATEST_COSIGN_VERSION}_${architecture}.deb" -o /tmp/cosign_${LATEST_COSIGN_VERSION}_${architecture}.deb
170171

171172
dpkg -i /tmp/cosign_${LATEST_COSIGN_VERSION}_${architecture}.deb

0 commit comments

Comments
 (0)