From 0b7be9932efc2fc12b75f7de015e535bb13fda26 Mon Sep 17 00:00:00 2001 From: "warren.veerasingam" Date: Tue, 3 Mar 2020 16:02:06 -0600 Subject: [PATCH] added docs --- Makefile | 5 +++++ README.md | 16 ++++++++++++++-- docs/_site/additional.html | 2 +- docs/_site/index.html | 17 +++++++++++++++-- docs/_site/index.md | 15 ++++++++++++++- docs/index.md | 15 ++++++++++++++- 6 files changed, 63 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 1f165c71..7f803816 100644 --- a/Makefile +++ b/Makefile @@ -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 .. + diff --git a/README.md b/README.md index 3d3c26dd..b72e03db 100644 --- a/README.md +++ b/README.md @@ -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(){ @@ -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) diff --git a/docs/_site/additional.html b/docs/_site/additional.html index 7ad31181..76414d8b 100644 --- a/docs/_site/additional.html +++ b/docs/_site/additional.html @@ -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"} - + diff --git a/docs/_site/index.html b/docs/_site/index.html index 2213cf3f..909ed6a2 100644 --- a/docs/_site/index.html +++ b/docs/_site/index.html @@ -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"} - + @@ -162,10 +162,12 @@

Use .tfswitchrc file

  • 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 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(){
       builtin cd "$@";
    @@ -207,6 +209,17 @@ 

    Use .tfswitchrc file

    }
    +

    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
    +
    +

    Issues

    diff --git a/docs/_site/index.md b/docs/_site/index.md index d97d1e8f..95984027 100644 --- a/docs/_site/index.md +++ b/docs/_site/index.md @@ -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(){ @@ -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 +``` +
    ## Issues diff --git a/docs/index.md b/docs/index.md index d97d1e8f..95984027 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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(){ @@ -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 +``` +
    ## Issues