From a70d6ad88c8a26c477eaf3ca25be611cf4bc9ceb Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Tue, 17 May 2022 07:20:14 +1000 Subject: [PATCH] terraform-providers: update scripts - skip updates that include alpha|beta|pre in version --- .../networking/cluster/terraform-providers/update-provider | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/update-provider b/pkgs/applications/networking/cluster/terraform-providers/update-provider index 4310fcdcc27b..fb506cefbe06 100755 --- a/pkgs/applications/networking/cluster/terraform-providers/update-provider +++ b/pkgs/applications/networking/cluster/terraform-providers/update-provider @@ -128,9 +128,12 @@ version="$(jq -r '.version' <<<"${registry_response}")" if [[ ${old_version} == "${version}" && ${force} != 1 && -z ${vendorSha256} && ${old_vendor_sha256} != "${vendorSha256}" ]]; then echo_provider "already at version ${version}" exit -else - echo_provider "updating from ${old_version} to ${version}" fi +if [[ ${version} =~ (alpha|beta|pre) && ${force} != 1 ]]; then + echo_provider "not updating to unstable version ${version}" + exit +fi +echo_provider "updating from ${old_version} to ${version}" update_attr version "${version}" provider_source_url="$(jq -r '.source' <<<"${registry_response}")"