Skip to content

Commit 07b165a

Browse files
committed
bump minor
1 parent ac39640 commit 07b165a

File tree

2 files changed

+67
-57
lines changed

2 files changed

+67
-57
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
WITH_V: false
4949
INITIAL_VERSION: 0.6.0
5050
RELEASE_BRANCHES: release
51-
DEFAULT_BUMP: patch
51+
DEFAULT_BUMP: minor
5252

5353
- name: Check output
5454
env:

README.md

Lines changed: 66 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -7,98 +7,131 @@
77
<img style="text-allign:center" src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/smallerlogo.png" alt="drawing" width="110" height="140"/>
88

99

10-
The `tgswitch` command line tool lets you switch between different versions of [terragrunt](https://www.terragrunt.io/).
10+
The `tgswitch` command line tool lets you switch between different versions of <a href="https://terragrunt.gruntwork.io/" target="_blank">terragrunt</a>.
1111
If you do not have a particular version of terragrunt installed, `tgswitch` will download the version you desire.
1212
The installation is minimal and easy.
1313
Once installed, simply select the version you require from the dropdown and start using terragrunt.
1414

15-
16-
See installation guide here: [tgswitch installation](https://warrensbox.github.io/tgswitch/)
17-
18-
***Important**
19-
Please see upcoming changes [Version 0.5](CHANGELOG.md)
20-
2115
## Installation
2216

2317
`tgswitch` is available for MacOS and Linux based operating systems.
2418

2519
### Homebrew
2620

27-
Installation for MacOS is the easiest with Homebrew. [If you do not have homebrew installed, click here](https://brew.sh/).
28-
21+
Installation for MacOS is the easiest with Homebrew. <a href="https://brew.sh/" target="_blank">If you do not have homebrew installed, click here</a>.
2922

3023
```ruby
3124
brew install warrensbox/tap/tgswitch
3225
```
3326

3427
### Linux
3528

36-
Installation for other linux operation systems.
29+
Installation for Linux operation systems.
3730

3831
```sh
3932
curl -L https://raw.githubusercontent.com/warrensbox/tgswitch/release/install.sh | bash
4033
```
4134

4235
### Install from source
4336

44-
Alternatively, you can install the binary from source [here](https://github.com/warrensbox/tgswitch/releases)
37+
Alternatively, you can install the binary from the source <a href="https://github.com/warrensbox/tgswitch/releases" target="_blank">here</a>.
4538

39+
[Having trouble installing](https://tgswitch.warrensbox.com/Troubleshoot/).
4640
## How to use:
4741
### Use dropdown menu to select version
48-
<img src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/tgswitch.gif" alt="drawing" style="width: 180px;"/>
42+
<img src="https://kepler-images.s3.us-east-2.amazonaws.com/warrensbox/tgswitch/tgswitch_v1.gif" alt="drawing" style="width: 600px;"/>
4943

50-
1. You can switch between different versions of terragrunt by typing the command `tgswitch` on your terminal.
44+
1. You can switch between different versions of terragrunt by typing the command `tgswitch` on your terminal.
5145
2. Select the version of terragrunt you require by using the up and down arrow.
5246
3. Hit **Enter** to select the desired version.
5347

5448
The most recently selected versions are presented at the top of the dropdown.
5549

5650
### Supply version on command line
57-
<img src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/tgswitch-v4.gif" alt="drawing" style="width: 170px;"/>
51+
<img src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/tgswitch_v3.gif" alt="drawing" style="width: 600px;"/>
5852

5953
1. You can also supply the desired version as an argument on the command line.
60-
2. For example, `tgswitch 0.10.7` for version 0.10.7 of terragrunt.
61-
3. Hit **Enter** to switch version.
54+
2. For example, `tgswitch 0.37.1` for version 0.37.1 of terragrunt.
55+
3. Hit **Enter** to switch.
56+
57+
### Use environment variables
58+
<img src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/tgswitch_v7.gif" alt="drawing" style="width: 600px;"/>
59+
You can also set the `TG_VERSION` environment variable to your desired terragrunt version.
60+
For example:
61+
```bash
62+
export TG_VERSION=0.37.0
63+
tgswitch #will automatically switch to terragrunt version 0.37.0
64+
```
6265

63-
### Use custom installation location (For non-admin - users with limited privilege on their computers)
64-
You can specify a custom binary path for your terragrunt installation
66+
### Use .tgswitch.toml file (For non-admin AND Apple M1 users with limited privilege on their computers)
67+
Specify a custom binary path for your terragrunt installation
68+
69+
<img src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/tgswitch_v5.gif" alt="drawing" style="width: 600px;"/>
70+
<img src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/tgswitch_v4.gif" alt="drawing" style="width: 600px;"/>
71+
72+
1. Create a custom binary path. Ex: `mkdir /Users/uveerum/bin` (replace uveerum with your username)
73+
2. Add the path to your PATH. Ex: `export PATH=$PATH:/Users/uveerum/bin` (add this to your bash profile or zsh profile)
74+
3. Pass -b or --bin parameter with your custom path to install terragrunt. Ex: `tgswitch -b /Users/uveerum/bin/terragrunt 0.34.0 `
75+
4. Optionally, you can create a `.tgswitch.toml` file in your terragrunt directory(current directory) OR in your home directory(~/.tgswitch.toml). The toml file in the current directory has a higher precedence than toml file in the home directory
76+
5. Your `.tgswitch.toml` file should look like this:
77+
```ruby
78+
bin = "/usr/local/bin/terragrunt"
79+
version = "0.34.0"
80+
```
81+
4. Run `tgswitch` and it should automatically install the required terragrunt version in the specified binary path
6582

66-
1. Create a custom binary path. Ex: `mkdir /Users/warrenveerasingam/bin` (replace warrenveerasingam with your username)
67-
2. Add the path to your PATH. Ex: `export PATH=$PATH:/Users/warrenveerasingam/bin` (add this to your bash profile or zsh profile)
68-
3. Pass -b or --bin parameter with your custom path to install terragrunt. Ex: `tgswitch -b /Users/warrenveerasingam/bin/terragrunt 0.14.1 `
83+
**NOTE**
84+
1. For linux users that do not have write permission to `/usr/local/bin/`, `tgswitch` will attempt to install terragrunt at `$HOME/bin`. Run `export PATH=$PATH:$HOME/bin` to append bin to PATH
85+
2. For windows host, `tgswitch` need to be run under `Administrator` mode, and `$HOME/.tgswitch.toml` with `bin` must be defined (with a valid path) as minimum, below is an example for `$HOME/.tgswitch.toml` on windows
6986

87+
```toml
88+
bin = "C:\\Users\\<%USRNAME%>\\bin\\terragrunt.exe"
89+
```
7090
### Use .tgswitchrc file
71-
<img src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/manual-tgswitchrc.gif" alt="drawing" style="width: 170px;"/>
91+
<img src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/tgswitch_v6.gif" alt="drawing" style="width: 600px;"/>
7292

7393
1. Create a `.tgswitchrc` file containing the desired version
74-
2. For example, `echo "0.14.1" >> .tgswitchrc` for version 0.14.1 of terragrunt
94+
2. For example, `echo "0.33.0" >> .tgswitchrc` for version 0.33.0 of terragrunt
7595
3. Run the command `tgswitch` in the same directory as your `.tgswitchrc`
7696

77-
#### *Instead of a `.tgswitchrc` file, a `.terragrunt-version` file may be used for compatibility with [`tgenv`](https://github.com/cunymatthieu/tgenv#terragrunt-version) and other tools which use it*
97+
*Instead of a `.tgswitchrc` file, a `.terragrunt-version` file may be used as well*
98+
99+
### Use terragrunt.hcl file
100+
<img src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/tgswitch_v2.gif" alt="drawing" style="width: 600px;"/>
101+
102+
If a terragrunt.hcl file with the terragrunt constrain is included in the current directory, it should automatically download or switch to that terragrunt version. For example, the following should automatically switch terragrunt to version 0.36.0:
103+
```ruby
104+
terragrunt_version_constraint = ">= 0.36, < 0.36.1"
105+
...
106+
```
107+
108+
### Get the version from a subdirectory
109+
```bash
110+
tgswitch --chdir terragrunt_dir
111+
tgswitch -c terragrunt_dir
112+
```
78113

79114
**Automatically switch with bash**
80115

81116
Add the following to the end of your `~/.bashrc` file:
82-
(Use either `.tgswitchrc` or `.terragrunt-version`)
117+
(Use either `.tgswitchrc` or `.tgswitch.toml` or `.terragrunt-version`)
83118

84-
```
119+
```sh
85120
cdtgswitch(){
86121
builtin cd "$@";
87122
cdir=$PWD;
88-
if [ -f "$cdir/.tgswitchrc" ]; then
123+
if [ -e "$cdir/.tgswitchrc" ]; then
89124
tgswitch
90125
fi
91126
}
92127
alias cd='cdtgswitch'
93128
```
94129

95-
<img src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/auto-tgswitchrc.gif" alt="drawing" style="width: 170px;"/>
96-
97130
**Automatically switch with zsh**
98131

99132
Add the following to the end of your `~/.zshrc` file:
100133

101-
```
134+
```sh
102135
load-tgswitch() {
103136
local tgswitchrc_path=".tgswitchrc"
104137

@@ -115,40 +148,17 @@ load-tgswitch
115148
> ```
116149
117150
*older version of zsh*
118-
```
151+
```sh
119152
cd(){
120153
builtin cd "$@";
121154
cdir=$PWD;
122-
if [ -f "$cdir/.tgswitchrc" ]; then
155+
if [ -e "$cdir/.tgswitchrc" ]; then
123156
tgswitch
124157
fi
125158
}
126159
```
127-
128-
**Automatically switch with fish**
129-
130-
Add the following to your `~/.config/fish/config.fish` file:
131-
132-
```
133-
function cdtgswitch
134-
builtin cd "$argv"
135-
set cdir $PWD
136-
if test -f "$cdir/.tgswitchrc"
137-
tgswitch
138-
end
139-
end
140-
alias cd='cdtgswitch'
141-
```
142-
143-
## Additional Info
144-
145-
See how to *upgrade*, *uninstall*, *troubleshoot* here:[More info](https://warrensbox.github.io/tgswitch/additional)
146-
147-
148160
## Issues
149-
150161
Please open *issues* here: [New Issue](https://github.com/warrensbox/tgswitch/issues)
151162

152163
## Upcoming Features
153-
154-
Use environment variable to change terragrunt version
164+
N/A

0 commit comments

Comments
 (0)