Skip to content
This repository has been archived by the owner on May 1, 2021. It is now read-only.

Latest commit

 

History

History
116 lines (76 loc) · 3.13 KB

README.md

File metadata and controls

116 lines (76 loc) · 3.13 KB

Basic Terraform version manager

Codacy Badge Build Status platform

Dependencies

You need git, curl or wget

Install

   git clone https://github.com/renatoassis01/tfvm.git .tfvm

Add to your profile (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc)

#tfvm
export TFVMDIR=$HOME/.tfvm
export PATH=$TFVMDIR/bin:$TFVMDIR/bin/shims:$PATH

Note: source you profile eg: source .bashrc

 tfvm -v
 Basic Terraform version manager (version: x.x.x)

How to use:

tfvm ls-remote                               # Lists the published version
tfvm install 0.11.13                         # Install a specific version number
tfvm install latest                          # Install last version published
tfvm use latest                              # Use last version installed
tfvm use 0.11.13                             # Use a version installed
tfvm ls                                      # List all installed versions
tfvm clear                                   # Clear all installed versions except enabled version

Bash completion

Add to your profile (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc)

[[ -r $TFVMDIR/bash_completion ]] && \. $TFVMDIR/bash_completion

Note: source you profile eg: source .bashrc

Usage:

$ tfvm Tab

install    ls         ls-remote  use        -v         --version 

$ tfvm install Tab Tab Tab

 0.11.12 0.11.13 0.11.14 latest  

$ tfvm use Tab Tab Tab

0.11.12 0.11.13 0.11.14 latest  

Inspired by Node Version Manager - nvm

Development

Dependencies:

run shellcheck:

    shellcheck ./bin/tfvm

run test:

  bats ./tests/test.bats

Submit your pull request

Todo

  • Basic version funcional
  • Implement the option to use the latest version, using the latest (tfvm use latest) flag
  • Implement the option to install the latest version by using the latest (tfvm install latest) flag
  • Bash Completion
  • Zsh Completion
  • Test units
  • CD/CI
  • Suport OSX
  • Clear all installed versions

License

MIT License