diff options
author | Bulat Khusnimardanov <61210700+bulat-khusnimardanov@users.noreply.github.com> | 2023-08-22 03:31:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-22 03:31:20 +0300 |
commit | 71ac2021e1350e673c0602b2ab6526d4353bc293 (patch) | |
tree | bf5ed2c597909aecd3d5338ac3d475b672a74662 /src/terraform/install.sh | |
parent | a4b31f314fa1385950a9dbc81682d9acb2e2fba9 (diff) |
Enhancing Terraform Feature Stability (#657)feature_terraform_1.3.4
* 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>
Diffstat (limited to 'src/terraform/install.sh')
-rwxr-xr-x | src/terraform/install.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/terraform/install.sh b/src/terraform/install.sh index 82e3e8d..1156f6d 100755 --- a/src/terraform/install.sh +++ b/src/terraform/install.sh @@ -165,7 +165,8 @@ ensure_cosign() { if ! type cosign > /dev/null 2>&1; then echo "Installing cosign..." - local LATEST_COSIGN_VERSION=$(curl https://api.github.com/repos/sigstore/cosign/releases/latest | grep tag_name | cut -d : -f2 | tr -d "v\", ") + LATEST_COSIGN_VERSION="latest" + find_version_from_git_tags LATEST_COSIGN_VERSION 'https://github.com/sigstore/cosign' curl -L "https://github.com/sigstore/cosign/releases/latest/download/cosign_${LATEST_COSIGN_VERSION}_${architecture}.deb" -o /tmp/cosign_${LATEST_COSIGN_VERSION}_${architecture}.deb dpkg -i /tmp/cosign_${LATEST_COSIGN_VERSION}_${architecture}.deb |