Skip to content

Commit

Permalink
docs: Streamline/fix docu site files and README
Browse files Browse the repository at this point in the history
  • Loading branch information
yermulnik committed Apr 26, 2024
1 parent a455c66 commit b9d65e4
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ yay tfswitch-bin

Alternatively, you can install the binary from the source <a href="https://github.com/warrensbox/terraform-switcher/releases" target="_blank">here</a>.

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.
Expand All @@ -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

Expand All @@ -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

Expand Down
17 changes: 17 additions & 0 deletions www/docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion www/docs/Upgrade-or-Uninstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion www/docs/usage/ci-cd.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 9 additions & 6 deletions www/docs/usage/general.md
Original file line number Diff line number Diff line change
@@ -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

This comment has been minimized.

Copy link
@warrensbox

warrensbox Apr 27, 2024

Owner

Should 4 be 7?

This comment has been minimized.

Copy link
@yermulnik

yermulnik Apr 27, 2024

Author Collaborator

Thanks fixed
Also #420 (comment)

*(If you disagree with this order of precedence, please open an issue)*
2 changes: 1 addition & 1 deletion www/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit b9d65e4

Please sign in to comment.