Automated Install with latest version of Hashi tools - how to get latest version number?

Hi Terraform -

I run TF on VMs and use a bash script to download the latest version to install it.

Now I have to check the TF (& other Hashi sites) for the latest version and update the version number on my scripts.

However, just wondering if there is a better way to get the latest version number?

For example on GitHub you can get ‘latest’ and parse out the exact version number if needed.

Not sure how to best get it for Hashi tools except checking the site. And even with using curl --use ascii there is much parsing to do.

Ok then, please suggest if there is a good way to get the ‘latest’ version to download w/o needing to check the site even with curl.

Or perhaps there is a better way to do get the ‘latest’ download from a Github site?

Please let me know when you get a chance.

Thank you.