Skip to content

Commit

Permalink
added tgswitch
Browse files Browse the repository at this point in the history
  • Loading branch information
Warren Veerasingam authored and Warren Veerasingam committed Aug 31, 2018
1 parent 283c7ff commit e10e278
Show file tree
Hide file tree
Showing 27 changed files with 190 additions and 190 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
- run: go vet -tests=false ./...
- run: go test -v ./...
- run: mkdir -p build
- run: go build -v -o build/tgshift
- run: go build -v -o build/tgswitch

- persist_to_workspace:
root: build
paths: tgshift
paths: tgswitch

test-ubuntu:
docker:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ src
main
build
dist
tgshift
tgswitch

.DS_Store

Expand Down
12 changes: 6 additions & 6 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ builds:
- ldflags:
- -s -w -X "main.version={{.Env.RELEASE_VERSION}}"
- main: main.go
binary: tgshift
binary: tgswitch
goos:
- windows
- darwin
Expand Down Expand Up @@ -32,7 +32,7 @@ archive:
brew:
# Name of the recipe
# Default to project name
name: tgshift
name: tgswitch

# Reporitory to push the tap to.
github:
Expand All @@ -55,15 +55,15 @@ brew:

# Caveats for the user of your binary.
# Default is empty.
caveats: "Type 'tgshift' on your command line and choose the terragrunt version that you want from the dropdown. This command currently only works on MacOs and Linux"
caveats: "Type 'tgswitch' on your command line and choose the terragrunt version that you want from the dropdown. This command currently only works on MacOs and Linux"

# Your app's homepage.
# Default is empty.
homepage: "https://warrensbox.github.io/terragrunt-switcher"

# Your app's description.
# Default is empty.
description: "The tgshift command lets you switch between terragrunt versions."
description: "The tgswitch command lets you switch between terragrunt versions."

# Setting this will prevent goreleaser to actually try to commit the updated
# formula - instead, the formula file will be stored on the dist folder only,
Expand All @@ -78,10 +78,10 @@ brew:
# So you can `brew test` your formula.
# Default is empty.
test: |
system "#{bin}/tgshift --version"
system "#{bin}/tgswitch --version"
# Custom install script for brew.
# Default is 'bin.install "program"'.
install: |
bin.install "tgshift"
bin.install "tgswitch"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EXE := tgshift
EXE := tgswitch
PKG := github.com/warrensbox/terragrunt-switcher
VER := $(shell git ls-remote --tags git://github.com/warrensbox/terragrunt-switcher | awk '{print $$2}'| awk -F"/" '{print $$3}' | sort -n -t. -k1,1 -k2,2 -k3,3 | tail -n 1)
PATH := build:$(PATH)
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@

# Terragrunt Switcher

<img style="text-allign:center" src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgshift/smallerlogo.png" alt="drawing" width="110" height="140"/>
<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"/>


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


See installation guide here: [tgshift installation](https://warrensbox.github.io/terragrunt-switcher/)
See installation guide here: [tgswitch installation](https://warrensbox.github.io/terragrunt-switcher/)

## Installation

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

### Homebrew

Installation for MacOS is the easiest with Homebrew. [If you do not have homebrew installed, click here](https://brew.sh/).


```ruby
brew install warrensbox/tap/tgshift
brew install warrensbox/tap/tgswitch
```

### Linux
Expand All @@ -42,19 +42,19 @@ Alternatively, you can install the binary from source [here](https://github.com/

## How to use:
### Use dropdown menu to select version
<img src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgshift/tgshift.gif" alt="drawing" style="width: 180px;"/>
<img src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/tgswitch.gif" alt="drawing" style="width: 180px;"/>

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

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

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

1. You can also supply the desired version as an argument on the command line.
2. For example, `tgshift 0.10.7` for version 0.10.7 of terragrunt.
2. For example, `tgswitch 0.10.7` for version 0.10.7 of terragrunt.
3. Hit **Enter** to switch version.

## Additional Info
Expand Down
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ theme: jekyll-theme-minimal
#github: [metadata]
repository: warrensbox/terragrunt-switcher
logo: /assets/img/logo.png
title: tgshift
title: tgswitch

show_downloads: true

Expand Down
12 changes: 6 additions & 6 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="The tgshift command line tool lets you switch between different versions of terragrunt.">
<meta name="description" content="The tgswitch command line tool lets you switch between different versions of terragrunt.">


<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgshift/favicon_tgshift_16.png" sizes="16x16">
<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgshift/favicon_tgshift_32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgshift/favicon_tgshift_48.png" sizes="48x48">
<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/favicon_tgswitch_16.png" sizes="16x16">
<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/favicon_tgswitch_32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/favicon_tgswitch_48.png" sizes="48x48">

{% seo %}
<link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
Expand All @@ -31,10 +31,10 @@
<div class="wrapper">
<header>
<!-- <h1 style="font-size:25px;"><a href="{{ "/" | absolute_url }}">{{ site.title | default: site.github.repository_name }}</a></h1> -->
<!-- <h1 style="font-size:25px; text-align: center"><a href="{{ "/" | absolute_url }}">tgshift</a></h1> -->
<!-- <h1 style="font-size:25px; text-align: center"><a href="{{ "/" | absolute_url }}">tgswitch</a></h1> -->

<p align="center">
<img align="middle" src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgshift/logo.png" alt="Logo" />
<img align="middle" src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/logo.png" alt="Logo" />
</p>

<p style="text-align: center">{{ site.description | default: site.github.project_tagline }}</p>
Expand Down
20 changes: 10 additions & 10 deletions docs/_site/additional.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="The tgshift command line tool lets you switch between different versions of terragrunt.">
<meta name="description" content="The tgswitch command line tool lets you switch between different versions of terragrunt.">


<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgshift/favicon_tgshift_16.png" sizes="16x16">
<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgshift/favicon_tgshift_32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgshift/favicon_tgshift_48.png" sizes="48x48">
<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/favicon_tgswitch_16.png" sizes="16x16">
<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/favicon_tgswitch_32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/favicon_tgswitch_48.png" sizes="48x48">

<!-- Begin Jekyll SEO tag v2.4.0 -->
<title>gswap | Manage terragrunt versions - the gswap command line tool lets you switch between different versions of terragrunt</title>
Expand Down Expand Up @@ -44,10 +44,10 @@
<div class="wrapper">
<header>
<!-- <h1 style="font-size:25px;"><a href="http://localhost:4000/">gswap</a></h1> -->
<!-- <h1 style="font-size:25px; text-align: center"><a href="http://localhost:4000/">tgshift</a></h1> -->
<!-- <h1 style="font-size:25px; text-align: center"><a href="http://localhost:4000/">tgswitch</a></h1> -->

<p align="center">
<img align="middle" src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgshift/logo.png" alt="Logo" />
<img align="middle" src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/logo.png" alt="Logo" />
</p>

<p style="text-align: center">Manage terragrunt versions - the gswap command line tool lets you switch between different versions of terragrunt</p>
Expand All @@ -74,7 +74,7 @@ <h2 id="upgrade">Upgrade:</h2>

<h3 id="homebrew">Homebrew</h3>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">brew</span> <span class="n">upgrade</span> <span class="n">warrensbox</span><span class="o">/</span><span class="n">tap</span><span class="o">/</span><span class="n">tgshift</span>
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">brew</span> <span class="n">upgrade</span> <span class="n">warrensbox</span><span class="o">/</span><span class="n">tap</span><span class="o">/</span><span class="n">tgswitch</span>
</code></pre></div></div>
<h3 id="linux">Linux</h3>

Expand All @@ -87,13 +87,13 @@ <h2 id="uninstall">Uninstall:</h2>

<h3 id="homebrew-1">Homebrew</h3>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">brew</span> <span class="n">uninstall</span> <span class="n">warrensbox</span><span class="o">/</span><span class="n">tap</span><span class="o">/</span><span class="n">tgshift</span>
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">brew</span> <span class="n">uninstall</span> <span class="n">warrensbox</span><span class="o">/</span><span class="n">tap</span><span class="o">/</span><span class="n">tgswitch</span>
</code></pre></div></div>
<h3 id="linux-1">Linux</h3>

<p>Rerun:</p>

<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rm /usr/local/bin/tgshift
<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rm /usr/local/bin/tgswitch
</code></pre></div></div>

<h2 id="troubleshoot">Troubleshoot:</h2>
Expand All @@ -107,7 +107,7 @@ <h2 id="troubleshoot">Troubleshoot:</h2>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="s2">"Unable to create symlink. You must have SUDO privileges"</span>
</code></pre></div></div>
<p>You probably need to have <strong>sudo</strong> privileges to install <em>tgshift</em>.</p>
<p>You probably need to have <strong>sudo</strong> privileges to install <em>tgswitch</em>.</p>

<p><a href="#upgrade">Back to top</a> <br />
<a href="index">Back to main</a></p>
Expand Down
8 changes: 4 additions & 4 deletions docs/_site/additional.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
### Homebrew

```ruby
brew upgrade warrensbox/tap/tgshift
brew upgrade warrensbox/tap/tgswitch
```
### Linux

Expand All @@ -21,14 +21,14 @@ curl -L https://raw.githubusercontent.com/warrensbox/terragrunt-switcher/release
### Homebrew

```ruby
brew uninstall warrensbox/tap/tgshift
brew uninstall warrensbox/tap/tgswitch
```
### Linux

Rerun:

```sh
rm /usr/local/bin/tgshift
rm /usr/local/bin/tgswitch
```

## Troubleshoot:
Expand All @@ -45,7 +45,7 @@ install: can't change permissions of /usr/local/bin: Operation not permitted
```ruby
"Unable to create symlink. You must have SUDO privileges"
```
You probably need to have **sudo** privileges to install *tgshift*.
You probably need to have **sudo** privileges to install *tgswitch*.
[Back to top](#upgrade)
[Back to main](index)
20 changes: 10 additions & 10 deletions docs/_site/docs/additional.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="The tgshift command line tool lets you switch between different versions of terragrunt.">
<meta name="description" content="The tgswitch command line tool lets you switch between different versions of terragrunt.">


<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgshift/favicon_tgshift_16.png" sizes="16x16">
<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgshift/favicon_tgshift_32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgshift/favicon_tgshift_48.png" sizes="48x48">
<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/favicon_tgswitch_16.png" sizes="16x16">
<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/favicon_tgswitch_32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/favicon_tgswitch_48.png" sizes="48x48">

<!-- Begin Jekyll SEO tag v2.4.0 -->
<title>gswap | Manage terragrunt versions - the gswap command line tool lets you switch between different versions of terragrunt</title>
Expand Down Expand Up @@ -44,10 +44,10 @@
<div class="wrapper">
<header>
<!-- <h1 style="font-size:25px;"><a href="http://localhost:4000/">gswap</a></h1> -->
<!-- <h1 style="font-size:25px; text-align: center"><a href="http://localhost:4000/">tgshift</a></h1> -->
<!-- <h1 style="font-size:25px; text-align: center"><a href="http://localhost:4000/">tgswitch</a></h1> -->

<p align="center">
<img align="middle" src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgshift/logo.png" alt="Logo" />
<img align="middle" src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tgswitch/logo.png" alt="Logo" />
</p>

<p style="text-align: center">Manage terragrunt versions - the gswap command line tool lets you switch between different versions of terragrunt</p>
Expand All @@ -74,7 +74,7 @@ <h2 id="upgrade">Upgrade:</h2>

<h3 id="homebrew">Homebrew</h3>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">brew</span> <span class="n">upgrade</span> <span class="n">warrensbox</span><span class="o">/</span><span class="n">tap</span><span class="o">/</span><span class="n">tgshift</span>
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">brew</span> <span class="n">upgrade</span> <span class="n">warrensbox</span><span class="o">/</span><span class="n">tap</span><span class="o">/</span><span class="n">tgswitch</span>
</code></pre></div></div>
<h3 id="linux">Linux</h3>

Expand All @@ -87,13 +87,13 @@ <h2 id="uninstall">Uninstall:</h2>

<h3 id="homebrew-1">Homebrew</h3>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">brew</span> <span class="n">uninstall</span> <span class="n">warrensbox</span><span class="o">/</span><span class="n">tap</span><span class="o">/</span><span class="n">tgshift</span>
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">brew</span> <span class="n">uninstall</span> <span class="n">warrensbox</span><span class="o">/</span><span class="n">tap</span><span class="o">/</span><span class="n">tgswitch</span>
</code></pre></div></div>
<h3 id="linux-1">Linux</h3>

<p>Rerun:</p>

<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rm /usr/local/bin/tgshift
<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rm /usr/local/bin/tgswitch
</code></pre></div></div>

<h2 id="troubleshoot">Troubleshoot:</h2>
Expand All @@ -107,7 +107,7 @@ <h2 id="troubleshoot">Troubleshoot:</h2>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="s2">"Unable to create symlink. You must have SUDO privileges"</span>
</code></pre></div></div>
<p>You probably need to have <strong>sudo</strong> privileges to install <em>tgshift</em>.</p>
<p>You probably need to have <strong>sudo</strong> privileges to install <em>tgswitch</em>.</p>

<p><a href="#upgrade">Back to top</a> <br />
<a href="index">Back to main</a></p>
Expand Down
8 changes: 4 additions & 4 deletions docs/_site/docs/additional.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
### Homebrew

```ruby
brew upgrade warrensbox/tap/tgshift
brew upgrade warrensbox/tap/tgswitch
```
### Linux

Expand All @@ -21,14 +21,14 @@ curl -L https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/
### Homebrew

```ruby
brew uninstall warrensbox/tap/tgshift
brew uninstall warrensbox/tap/tgswitch
```
### Linux

Rerun:

```sh
rm /usr/local/bin/tgshift
rm /usr/local/bin/tgswitch
```

## Troubleshoot:
Expand All @@ -45,7 +45,7 @@ install: can't change permissions of /usr/local/bin: Operation not permitted
```ruby
"Unable to create symlink. You must have SUDO privileges"
```
You probably need to have **sudo** privileges to install *tgshift*.
You probably need to have **sudo** privileges to install *tgswitch*.
[Back to top](#upgrade)
[Back to main](index)
Loading

0 comments on commit e10e278

Please sign in to comment.