terraform-providers: update scripts

- skip updates that include alpha|beta|pre in version
This commit is contained in:
zowoq 2022-05-17 07:20:14 +10:00
parent 4f7d4241c2
commit a70d6ad88c

View file

@ -128,9 +128,12 @@ version="$(jq -r '.version' <<<"${registry_response}")"
if [[ ${old_version} == "${version}" && ${force} != 1 && -z ${vendorSha256} && ${old_vendor_sha256} != "${vendorSha256}" ]]; then if [[ ${old_version} == "${version}" && ${force} != 1 && -z ${vendorSha256} && ${old_vendor_sha256} != "${vendorSha256}" ]]; then
echo_provider "already at version ${version}" echo_provider "already at version ${version}"
exit exit
else
echo_provider "updating from ${old_version} to ${version}"
fi 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}" update_attr version "${version}"
provider_source_url="$(jq -r '.source' <<<"${registry_response}")" provider_source_url="$(jq -r '.source' <<<"${registry_response}")"