Skip to content
This repository was archived by the owner on Jul 31, 2024. It is now read-only.

Commit c01ae5b

Browse files
committed
update provider/build scripts
1 parent fab6a9e commit c01ae5b

File tree

3 files changed

+41
-35
lines changed

3 files changed

+41
-35
lines changed

bin/install-macos.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
echo 'installing brew packages'
4+
brew update
5+
brew tap liamg/tfsec
6+
brew install tfenv tflint terraform-docs pre-commit liamg/tfsec/tfsec coreutils
7+
brew upgrade tfenv tflint terraform-docs pre-commit liamg/tfsec/tfsec coreutils
8+
9+
echo 'installing pre-commit hooks'
10+
pre-commit install
11+
12+
echo 'setting pre-commit hooks to auto-install on clone in the future'
13+
git config --global init.templateDir ~/.git-template
14+
pre-commit init-templatedir ~/.git-template
15+
16+
echo 'installing terraform with tfenv'
17+
tfenv install latest:^0.12
18+
tfenv use latest:^0.12

bin/install-ubuntu.sh

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
echo 'installing dependencies'
4+
sudo apt install python3-pip gawk &&\
5+
pip3 install pre-commit
6+
curl -L "$(curl -sL https://api.github.com/repos/segmentio/terraform-docs/releases/latest | grep -o -E "https://.+?-linux-amd64")" > terraform-docs && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/
7+
curl -L "$(curl -sL https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E "https://.+?_linux_amd64.zip")" > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/
8+
env GO111MODULE=on go get -u github.com/liamg/tfsec/cmd/tfsec
9+
git clone https://github.com/tfutils/tfenv.git ~/.tfenv || true
10+
mkdir -p ~/.local/bin/
11+
. ~/.profile
12+
ln -s ~/.tfenv/bin/* ~/.local/bin
13+
14+
echo 'installing pre-commit hooks'
15+
pre-commit install
16+
17+
echo 'setting pre-commit hooks to auto-install on clone in the future'
18+
git config --global init.templateDir ~/.git-template
19+
pre-commit init-templatedir ~/.git-template
20+
21+
echo 'installing terraform with tfenv'
22+
tfenv install latest:^0.12
23+
tfenv use latest:^0.12

bin/update-provider.sh

-35
This file was deleted.

0 commit comments

Comments
 (0)