diff --git a/README.md b/README.md index 1f2c5b32..a7a4bd1a 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ yay tfswitch-bin Alternatively, you can install the binary from the source here. -See [our installation documentation](https://tfswitch.warrensbox.com/Install) for more details. +See [our installation documentation](https://tfswitch.warrensbox.com/Installation) for more details. > [!IMPORTANT] > The version identifier of `tfswitch` has changed to align with the common `go` package versioning. @@ -87,7 +87,7 @@ Execute `tfswitch` and select the desired Terraform version via the dropdown men Use `tfswitch 1.7.0` to install Terraform version 1.7.0. Replace the version number as required. -More [usage guide here](https://tfswitch.warrensbox.com/Quick-Start/) +More [usage guide here](https://tfswitch.warrensbox.com/usage/commandline/) ## How to contribute @@ -98,7 +98,7 @@ See step-by-step instructions on how to contribute here: [Contribute](https://tf ## Additional Info -See how to *upgrade*, *uninstall*, *troubleshoot* here: [More info](https://tfswitch.warrensbox.com/Upgrade-or-Uninstall/) +See how to [*upgrade* and *uninstall*](https://tfswitch.warrensbox.com/Upgrade-or-Uninstall/) or [*troubleshoot*](https://tfswitch.warrensbox.com/Troubleshoot/) ## Issues diff --git a/www/docs/Installation.md b/www/docs/Installation.md index 6519b8aa..6406754c 100644 --- a/www/docs/Installation.md +++ b/www/docs/Installation.md @@ -20,6 +20,23 @@ Installation for Linux operating systems. curl -L https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh | bash ``` +By default installer script will try to download `tfswitch` binary into `/usr/local/bin` +To install at custom path use below: +```sh +curl -L https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh | bash -s -- -b $HOME/.local/bin +``` + +By default installer script will try to download latest version of `tfswitch` binary +To install custom (not latest) version use: +```sh +curl -L https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh | bash -s -- 1.1.1 +``` + +Both options can be combined though: +```sh +curl -L https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh | bash -s -- -b $HOME/.local/bin 1.1.1 +``` + ## Arch User Repository (AUR) packages for Arch Linux ```sh diff --git a/www/docs/Upgrade-or-Uninstall.md b/www/docs/Upgrade-or-Uninstall.md index 10dc0088..ce8c3241 100644 --- a/www/docs/Upgrade-or-Uninstall.md +++ b/www/docs/Upgrade-or-Uninstall.md @@ -22,7 +22,7 @@ brew uninstall warrensbox/tap/tfswitch ``` ### Linux -Run: +Run (replace `/usr/local/bin` if you installed `tfswitch` to a custom location): ```sh rm /usr/local/bin/tfswitch diff --git a/www/docs/usage/ci-cd.md b/www/docs/usage/ci-cd.md index de5ec885..7a328b53 100644 --- a/www/docs/usage/ci-cd.md +++ b/www/docs/usage/ci-cd.md @@ -2,7 +2,7 @@ 1. When using a CI/CD pipeline, you may want a default or fallback version to avoid the pipeline from hanging. 2. Ex: `tfswitch -d 1.2.3` or `tfswitch --default 1.2.3` installs version `1.2.3` when no other versions could be detected. -[Also, see CICD example](../continuous-integration) +[Also, see CICD example](../Continuous-Integration.md) ## Automatically switch with bash diff --git a/www/docs/usage/general.md b/www/docs/usage/general.md index 62a4d239..df46808d 100644 --- a/www/docs/usage/general.md +++ b/www/docs/usage/general.md @@ -1,11 +1,14 @@ -## Order of variable precedence +## Order of Terraform version definition precedence | Order | Method | | --- | ----------- | -| 1 | .tfswitch.toml | -| 2 | .tfswitchrc | -| 3 | .terraform-version | -| 4 | Environment variable | +| 1 | `$HOME/.tfswitch.toml` (`version` parameter) | +| 2 | `.tfswitch.toml` (`version` parameter) | +| 3 | `.tfswitchrc` (version as a string) | +| 4 | `.terraform-version` (version as a string) | +| 5 | Terraform root module (`required_version` constraint) | +| 6 | `terragrunt.hcl` (`terraform_version_constraint` parameter) | +| 7 | Environment variable (`TF_VERSION`) | -With 1 being the highest precedence and 4 the lowest +With 1 being the highest precedence and 4 — the lowest *(If you disagree with this order of precedence, please open an issue)* diff --git a/www/mkdocs.yml b/www/mkdocs.yml index 43c356a4..d2be69b7 100644 --- a/www/mkdocs.yml +++ b/www/mkdocs.yml @@ -1,5 +1,5 @@ site_name: TFSwitch -site_description: A command line tool to switch between different versions of terraform (install with homebrew and more) +site_description: A command line tool to switch between different versions of Terraform (install with Homebrew and more) copyright: This project is maintained by warrensbox repo_name: warrensbox/terraform-switcher repo_url: https://github.com/warrensbox/terraform-switcher