Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Streamline/fix docu site files and README #419

Merged
merged 3 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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://github.com/raw/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://github.com/raw/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://github.com/raw/warrensbox/terraform-switcher/release/install.sh | bash -s -- 1.1.1
```

Both options can be combined though:
```sh
curl -L https://github.com/raw/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
yermulnik marked this conversation as resolved.
Show resolved Hide resolved

| 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 7 — the lowest
*(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