Skip to content

Commit

Permalink
added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
warrensbox committed Mar 3, 2020
1 parent f466e1f commit 0b7be99
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 7 deletions.
5 changes: 5 additions & 0 deletions Makefile
Expand Up @@ -31,3 +31,8 @@ test: $(EXE)
.PHONEY: dep
dep:
dep ensure

.PHONY: docs
docs:
cd docs; bundle install --path vendor/bundler; bundle exec jekyll build -c _config.yml; cd ..

16 changes: 14 additions & 2 deletions README.md
Expand Up @@ -89,12 +89,12 @@ version = "0.11.3"
2. For example, `echo "0.10.5" >> .tfswitchrc` for version 0.10.5 of terraform
3. Run the command `tfswitch` in the same directory as your `.tfswitchrc`

*instead of a `.tfswitchrc` file, a `.terraform-version` file may be used for compatibility with [`tfenv`](https://github.com/tfutils/tfenv#terraform-version-file) and other tools which use it*
*Instead of a `.tfswitchrc` file, a `.terraform-version` file may be used for compatibility with [`tfenv`](https://github.com/tfutils/tfenv#terraform-version-file) and other tools which use it*

**Automatically switch with bash**

Add the following to the end of your `~/.bashrc` file:
(Use either `.tfswitchrc` or `.tfswitch.toml`)
(Use either `.tfswitchrc` or `.tfswitch.toml` or `.terraform-version`)

```
cdtfswitch(){
Expand Down Expand Up @@ -138,6 +138,18 @@ cd(){
}
```

### Jenkins setup
```
#!/bin/bash
echo "Installing tfswitch locally"
wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh
chmod 755 install.sh
./install.sh -b bin-directory
./bin-directory/tfswitch
```

## Additional Info

See how to *upgrade*, *uninstall*, *troubleshoot* here: [More info](https://warrensbox.github.io/terraform-switcher/additional)
Expand Down
2 changes: 1 addition & 1 deletion docs/_site/additional.html
Expand Up @@ -23,7 +23,7 @@
{"description":"Manage terraform versions - the tfswitch command line tool lets you switch between different versions of terraform","@type":"WebPage","url":"/additional.html","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"/assets/img/logo.png"}},"headline":"tfswitch","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->

<link rel="stylesheet" href="/assets/css/style.css?v=45af5d166a97ba6db56ba31181768391887b4abd">
<link rel="stylesheet" href="/assets/css/style.css?v=f466e1f1c1220520b876a4984c343b52a5f06826">
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<![endif]-->
Expand Down
17 changes: 15 additions & 2 deletions docs/_site/index.html
Expand Up @@ -23,7 +23,7 @@
{"name":"tfswitch","description":"Manage terraform versions - the tfswitch command line tool lets you switch between different versions of terraform","@type":"WebSite","url":"/","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"/assets/img/logo.png"}},"headline":"Terraform Switcher","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->

<link rel="stylesheet" href="/assets/css/style.css?v=45af5d166a97ba6db56ba31181768391887b4abd">
<link rel="stylesheet" href="/assets/css/style.css?v=f466e1f1c1220520b876a4984c343b52a5f06826">
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<![endif]-->
Expand Down Expand Up @@ -162,10 +162,12 @@ <h3 id="use-tfswitchrc-file">Use .tfswitchrc file</h3>
<li>Run the command <code class="highlighter-rouge">tfswitch</code> in the same directory as your <code class="highlighter-rouge">.tfswitchrc</code>.</li>
</ol>

<p><em>Instead of a <code class="highlighter-rouge">.tfswitchrc</code> file, a <code class="highlighter-rouge">.terraform-version</code> file may be used for compatibility with <a href="https://github.com/tfutils/tfenv#terraform-version-file"><code class="highlighter-rouge">tfenv</code></a> and other tools which use it</em></p>

<p><strong>Automatically switch with bash</strong></p>

<p>Add the following to the end of your <code class="highlighter-rouge">~/.bashrc</code> file:
(Use either <code class="highlighter-rouge">.tfswitchrc</code> or <code class="highlighter-rouge">.tfswitch.toml</code>)</p>
(Use either <code class="highlighter-rouge">.tfswitchrc</code> or <code class="highlighter-rouge">.tfswitch.toml</code> or <code class="highlighter-rouge">.terraform-version</code>)</p>

<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cdtfswitch(){
builtin cd "$@";
Expand Down Expand Up @@ -207,6 +209,17 @@ <h3 id="use-tfswitchrc-file">Use .tfswitchrc file</h3>
}
</code></pre></div></div>

<h3 id="jenkins-setup">Jenkins setup</h3>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#!/bin/bash </span>

<span class="nb">echo</span> <span class="s2">"Installing tfswitch locally"</span>
wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh
chmod 755 install.sh
./install.sh <span class="nt">-b</span> bin-directory

./bin-directory/tfswitch
</code></pre></div></div>

<hr />

<h2 id="issues">Issues</h2>
Expand Down
15 changes: 14 additions & 1 deletion docs/_site/index.md
Expand Up @@ -82,11 +82,12 @@ version = "0.11.3"
2. For example, `echo "0.10.5" >> .tfswitchrc` for version 0.10.5 of terraform.
3. Run the command `tfswitch` in the same directory as your `.tfswitchrc`.

*Instead of a `.tfswitchrc` file, a `.terraform-version` file may be used for compatibility with [`tfenv`](https://github.com/tfutils/tfenv#terraform-version-file) and other tools which use it*

**Automatically switch with bash**

Add the following to the end of your `~/.bashrc` file:
(Use either `.tfswitchrc` or `.tfswitch.toml`)
(Use either `.tfswitchrc` or `.tfswitch.toml` or `.terraform-version`)

```
cdtfswitch(){
Expand Down Expand Up @@ -130,6 +131,18 @@ cd(){
}
```

### Jenkins setup
```
#!/bin/bash
echo "Installing tfswitch locally"
wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh
chmod 755 install.sh
./install.sh -b bin-directory
./bin-directory/tfswitch
```

<hr>

## Issues
Expand Down
15 changes: 14 additions & 1 deletion docs/index.md
Expand Up @@ -82,11 +82,12 @@ version = "0.11.3"
2. For example, `echo "0.10.5" >> .tfswitchrc` for version 0.10.5 of terraform.
3. Run the command `tfswitch` in the same directory as your `.tfswitchrc`.

*Instead of a `.tfswitchrc` file, a `.terraform-version` file may be used for compatibility with [`tfenv`](https://github.com/tfutils/tfenv#terraform-version-file) and other tools which use it*

**Automatically switch with bash**

Add the following to the end of your `~/.bashrc` file:
(Use either `.tfswitchrc` or `.tfswitch.toml`)
(Use either `.tfswitchrc` or `.tfswitch.toml` or `.terraform-version`)

```
cdtfswitch(){
Expand Down Expand Up @@ -130,6 +131,18 @@ cd(){
}
```

### Jenkins setup
```
#!/bin/bash
echo "Installing tfswitch locally"
wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh
chmod 755 install.sh
./install.sh -b bin-directory
./bin-directory/tfswitch
```

<hr>

## Issues
Expand Down

0 comments on commit 0b7be99

Please sign in to comment.