Skip to content

Commit

Permalink
Added more sanity checks to the deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
c6fc committed Dec 24, 2019
1 parent 02a72e8 commit 819c1c1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions terraform/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ if [[ ! -f $(which npm) ]]; then
echo "Error: Must have NPM installed.";
fi

if [[ ! -f $(which terraform) ]]; then
ERR=1;
echo "Error: Must have Terraform installed.";
fi

if [[ "$(terraform -v | grep v0.11 | wc -l)" != "1" ]]; then
ERR=1;
echo "Error: Wrong version of Terraform is installed. NPK requires Terraform v0.11.";
fi

if [[ "$ERR" == "1" ]]; then
echo -e "\nInstall missing components, then try again.\n"
exit 1
Expand Down

0 comments on commit 819c1c1

Please sign in to comment.