Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add snapcraft yml #105

Merged
merged 4 commits into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 26 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,21 @@ Installation for MacOS is the easiest with Homebrew. [If you do not have homebre
brew install warrensbox/tap/tfswitch
```

### Linux
### General Linux

Installation for other linux operation systems.

```sh
curl -L https://github.com/raw/warrensbox/terraform-switcher/release/install.sh | bash
```

### Snapcraft for CentOS, Ubuntu, Linux Mint, RHEL, Debian, Fedora

```sh
sudo snap install tfswitch
```


### Install from source

Alternatively, you can install the binary from source [here](https://github.com/warrensbox/terraform-switcher/releases)
Expand Down Expand Up @@ -160,9 +167,9 @@ cd(){
echo "Installing tfswitch locally"
wget https://github.com/raw/warrensbox/terraform-switcher/release/install.sh
chmod 755 install.sh
./install.sh -b bin-directory
./install.sh -b `pwd`/.bin

./bin-directory/tfswitch
`pwd`/.bin/tfswitch
```

If you have limited permission, try:
Expand All @@ -171,15 +178,17 @@ If you have limited permission, try:
#!/bin/bash

echo "Installing tfswitch locally"
wget https://github.com/raw/warrensbox/terraform-switcher/release/install.sh
chmod 755 install.sh
./install.sh -b bin-directory
wget https://github.com/raw/warrensbox/terraform-switcher/release/install.sh #Get the installer on to your machine

chmod 755 install.sh #Make installer executable

./install.sh -b `pwd`/.bin #Install tfswitch in a location you have permission

CUSTOMBIN=`pwd`/.bin #set custom bin path

CUSTOMBIN=`pwd`/bin #set custom bin path
mkdir $CUSTOMBIN #create custom bin path
export PATH=$PATH:$CUSTOMBIN #Add custom bin path to PATH environment

./bin-directory/tfswitch -b $CUSTOMBIN/terraform 0.11.7
$CUSTOMBIN/tfswitch -b $CUSTOMBIN/terraform 0.11.7 #or simply tfswitch -b $CUSTOMBIN/terraform 0.11.7

terraform -v #testing version
```
Expand Down Expand Up @@ -210,15 +219,17 @@ jobs:

echo "Installing tfswitch locally"

wget https://github.com/raw/warrensbox/terraform-switcher/release/install.sh
chmod 755 install.sh
./install.sh -b bin-directory
wget https://github.com/raw/warrensbox/terraform-switcher/release/install.sh #Get the installer on to your machine

chmod 755 install.sh #Make installer executable

./install.sh -b `pwd`/.bin #Install tfswitch in a location you have permission

CUSTOMBIN=`pwd`/.bin #set custom bin path

CUSTOMBIN=`pwd`/bin #set custom bin path
mkdir $CUSTOMBIN #create custom bin path
export PATH=$PATH:$CUSTOMBIN #Add custom bin path to PATH environment

./bin-directory/tfswitch -b $CUSTOMBIN/terraform 0.11.7
$CUSTOMBIN/tfswitch -b $CUSTOMBIN/terraform 0.11.7 #or simply tfswitch -b $CUSTOMBIN/terraform 0.11.7

terraform -v #testing version
```
Expand Down
1 change: 0 additions & 1 deletion snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ description: |
Once installed, simply select the version you require from the dropdown and start using terraform.
architectures:
- build-on: arm64
- build-on: amd64
assumes: [snapd2.45]
base: core18

Expand Down
34 changes: 13 additions & 21 deletions www/docs/Continuous-Integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,17 @@
#!/bin/bash

echo "Installing tfswitch locally"
wget https://github.com/raw/warrensbox/terraform-switcher/release/install.sh
chmod 755 install.sh
./install.sh -b bin-directory
wget https://github.com/raw/warrensbox/terraform-switcher/release/install.sh #Get the installer on to your machine

./bin-directory/tfswitch
```
If you have limited permission, try:
chmod 755 install.sh #Make installer executable

```sh
#!/bin/bash
./install.sh -b `pwd`/.bin #Install tfswitch in a location you have permission

echo "Installing tfswitch locally"
wget https://github.com/raw/warrensbox/terraform-switcher/release/install.sh
chmod 755 install.sh
./install.sh -b bin-directory
CUSTOMBIN=`pwd`/.bin #set custom bin path

CUSTOMBIN=`pwd`/bin #set custom bin path
mkdir $CUSTOMBIN #create custom bin path
export PATH=$PATH:$CUSTOMBIN #Add custom bin path to PATH environment

./bin-directory/tfswitch -b $CUSTOMBIN/terraform 0.11.7
$CUSTOMBIN/tfswitch -b $CUSTOMBIN/terraform 0.11.7 #or simply tfswitch -b $CUSTOMBIN/terraform 0.11.7

terraform -v #testing version
```
Expand Down Expand Up @@ -56,15 +46,17 @@ jobs:

echo "Installing tfswitch locally"

wget https://github.com/raw/warrensbox/terraform-switcher/release/install.sh
chmod 755 install.sh
./install.sh -b bin-directory
wget https://github.com/raw/warrensbox/terraform-switcher/release/install.sh #Get the installer on to your machine

chmod 755 install.sh #Make installer executable

./install.sh -b `pwd`/.bin #Install tfswitch in a location you have permission

CUSTOMBIN=`pwd`/.bin #set custom bin path

CUSTOMBIN=`pwd`/bin #set custom bin path
mkdir $CUSTOMBIN #create custom bin path
export PATH=$PATH:$CUSTOMBIN #Add custom bin path to PATH environment

./bin-directory/tfswitch -b $CUSTOMBIN/terraform 0.11.7
$CUSTOMBIN/tfswitch -b $CUSTOMBIN/terraform 0.11.7 #or simply tfswitch -b $CUSTOMBIN/terraform 0.11.7

terraform -v #testing version
```
31 changes: 26 additions & 5 deletions www/docs/Troubleshoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,35 @@ Solution: You probably need to have privileges to install *tfswitch* at /usr/loc
Try the following:
```sh
wget https://github.com/raw/warrensbox/terraform-switcher/release/install.sh
chmod 755 install.sh
./install.sh -b bin-directory
wget https://github.com/raw/warrensbox/terraform-switcher/release/install.sh #Get the installer on to your machine:
chmod 755 install.sh #Make installer executable
./install.sh -b $HOME/.bin #Install tfswitch in a location you have permission:
$HOME/.bin/tfswitch #test
export PATH=$PATH:$HOME/.bin #Export your .bin into your path
#You should probably add step 4 in your `.bash_profile` in your $HOME directory.
#Next, try:
`tfswitch -b $HOME/.bin/terraform 0.11.7`
#or simply
`tfswitch -b $HOME/.bin/terraform`
./bin-directory/tfswitch
```
Or, use the custom directory option `-b`:
See the custom directory option `-b`:
<img src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tfswitch/tfswitch-v7.gif" alt="drawing" style="width: 670px;"/>
```sh
wget https://github.com/raw/warrensbox/terraform-switcher/release/install.sh
chmod 755 install.sh
./install.sh -b $HOME/.bin
$HOME/.bin/tfswitch
```