forked from donnemartin/dev-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devops.sh
executable file
·28 lines (24 loc) · 970 Bytes
/
devops.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://github.com/raw/Homebrew/install/master/install)"
fi
if test ! $(nvm current) = 'v12.16.3'; then
echo 'Please run web.sh and install node 12.16'
exit 1
fi
# DevOps
npm i -g dockerfile-language-server-nodejs
npm i -g bash-language-server
VERSION=$(curl -s https://github.com/gitapi/repos/hashicorp/terraform-ls/releases/latest | grep -oE 'tag_name[^,]*' | cut -d'v' -f 2 | cut -d'"' -f 1)
LOCATION=$(awk '{print "https://github.com/hashicorp/terraform-ls/releases/download/" $VERSION "/terraform-ls_" $1 "_darwin_amd64.zip"}')
FILENAME=$(awk '{print "~/Desktop/terraform-ls_" $VERSION "_darwin_amd64.zip" }')
curl -Lo $FILENAME $LOCATION
unzip $FILENAME
mv terraform-ls /usr/local/bin/terraform-ls
rm -rf $FILENAME
brew bundle --verbose --file=- <<-EOF
brew "git-crypt"
brew "terraform"
brew "terragrunt"
brew "terraform-docs"