Skip to content

Commit

Permalink
docs: update README with review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
crablab committed Apr 12, 2024
1 parent c2e865d commit 3b7933a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,38 @@
![GitHub Release](https://img.shields.io/github/v/release/warrensbox/terraform-switcher)
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/warrensbox/terraform-switcher)


# Terraform Switcher

<img style="text-align:center" src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tfswitch/smallerlogo.png" alt="drawing" width="120" height="130"/>

The `tfswitch` command line tool lets you switch between different versions of [terraform](https://www.terraform.io/).
If you do not have a particular version of terraform installed, `tfswitch` will download and verify the version you desire.
The `tfswitch` command line tool lets you switch between different versions of [Terraform](https://www.terraform.io/).
If you do not have a particular version of Terraform installed, `tfswitch` will download and verify the version you desire.
The installation is minimal and easy.
Once installed, simply select the version you require from the dropdown and start using terraform.

## Documentation
Click [here](https://tfswitch.warrensbox.com) for our extended documentation.

## Installation
`tfswitch` is available as a binary and on various package managers (eg. brew).

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.
>
> Version numbers will now be prefixed with a `v` - eg. `v1.2.3`
>
> Please change any automated implementations relying on the `tfswitch` version string.
>
> **Old version string:** `0.1.2412`
> **New version string:** `v1.0.3`
## Quick Start
### Dropdown Menu
Just call `tfswitch` and select the desired terraform version via the dropdown menu.
Execute `tfswitch` and select the desired Terraform version via the dropdown menu.
### Version on command line
Call `tfswitch 1.7.0` to install terraform in the version 1.7.0. Replace version string with your desired version.

## NOTE
Going forward we will change the version identifier of `tfswitch` to align with the common go package versioning.
Please be advised to change any automated implementation you might have that is relying on the `tfswitch` version string.
**Old version string:** `0.1.2412`
**New version string:** `v1.0.0` Note the `v` that is preceding all version numbers.

Use `tfswitch 1.7.0` to install Terraform version 1.7.0. Replace the version number as required.

## How to contribute
An open source project becomes meaningful when people collaborate to improve the code.
Expand Down
4 changes: 2 additions & 2 deletions www/docs/usage/ci-cd.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ function switch_terraform --on-event fish_postexec
string match --regex '^cd\s' "$argv" > /dev/null
set --local is_command_cd $status

if test $is_command_cd -eq 0
if test $is_command_cd -eq 0
if count *.tf > /dev/null

grep -c "required_version" *.tf > /dev/null
set --local tf_contains_version $status

if test $tf_contains_version -eq 0
if test $tf_contains_version -eq 0
command tfswitch
end
end
Expand Down

0 comments on commit 3b7933a

Please sign in to comment.