Skip to content

Commit

Permalink
added quick start
Browse files Browse the repository at this point in the history
  • Loading branch information
warrensbox committed Nov 29, 2021
1 parent df20be5 commit 4775ac8
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,18 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.13.1201] - 2021-11-28
### Bug fixes
- No matter what users pass to --bin or -b, the local binary is called terraform. User can resume old behavior where -b is custom

### Added
- -c, --chdir=value : Switch to a different working directory before executing the given command. Ex: tfswitch --chdir terraform_project will run tfswitch in the terraform_project directory
- -P, --show-latest-pre=value : Show latest pre-release implicit version. Ex: tfswitch --show-latest-pre 0.13 prints 0.13.0-rc1 (latest)
- -S, --show-latest-stable=value : Show latest implicit version. Ex: tfswitch --show-latest-stable 0.13 prints 0.13.7 (latest)
- -U, --show-latest : Show latest stable version

### Removed
- snapcraft installation option
5 changes: 0 additions & 5 deletions lib/install.go
Expand Up @@ -315,8 +315,3 @@ func InstallableBinLocation(userBinPath string) string {
os.Exit(1)
return ""
}

// func PrintCreateDirStmt(unableDir string, writable string) {
// fmt.Printf("Creating bin directory at: %s\n", writable)
// fmt.Printf("RUN `export PATH=$PATH:%s` to append bin to $PATH\n", writable)
// }
12 changes: 12 additions & 0 deletions www/docs/Quick-Start.md
Expand Up @@ -41,6 +41,18 @@ tfswitch #will automatically switch to terraform version 0.14.4
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.
### Show latest version only
1. Just show what the latest version is.
2. Run `tfswitch -U` or `tfswitch --show-latest`
3. Hit **Enter** to show.
### Show latest implicit version for stable releases
1. Show the latest implicit stable version.
2. Ex: `tfswitch -S 0.13` or `tfswitch --show-latest-stable 0.13` shows 0.13.6 (latest) version.
3. Hit **Enter** to show.
### Show latest implicit version for beta, alpha and release candidates(rc)
1. Show the latest implicit pre-release version.
2. Ex: `tfswitch -P 0.13` or `tfswitch --show-latest-pre 0.13` shows 0.13.0-rc1 (latest) version.
3. Hit **Enter** to show.
### Use version.tf file
If a .tf file with the terraform constrain is included in the current directory, it should automatically download or switch to that terraform version. For example, the following should automatically switch terraform to the lastest version:
```
Expand Down

0 comments on commit 4775ac8

Please sign in to comment.