warrensbox/terraform-switcher

Add flag to download latest terraform version

Closed this issue · 1 comments

It would be great if I could pass --latest to just download the latest terraform version.

I'm using this in a docker container so having a handy flag would be great, right now I've gotta do an external github lookup to terraform to get the latest version number then pass that into tfswitch.

@hongkongkiwi

Install latest version only

  1. Install the latest stable version only.
  2. Run tfswitch -u or tfswitch --latest.
  3. Hit Enter to install.

Install latest implicit version for stable releases

  1. Install the latest implicit stable version.
  2. Ex: tfswitch -s 0.13 or tfswitch --latest-stable 0.13 downloads 0.13.6 (latest) version.
  3. Hit Enter to install.

Install latest implicit version for beta, alpha and release candidates(rc)

  1. Install the latest implicit pre-release version.
  2. Ex: tfswitch -p 0.13 or tfswitch --latest-pre 0.13 downloads 0.13.0-rc1 (latest) version.
  3. Hit Enter to install.

Please upgrade to the latest version (Version: 0.10.958):
https://tfswitch.warrensbox.com/Upgrade-or-Uninstall/

Please help me test this version and let me know if you find any issues. Thank you.