-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.envrc
43 lines (40 loc) · 906 Bytes
/
.envrc
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Install asdf-vm plugins and tools.
asdf_tools="
python 3.6.15
terraform 1.1.0
"
if command -v asdf > /dev/null; then
echo "${asdf_tools}" > .tool-versions
for plugin in $(cut -d ' ' -f 1 .tool-versions); do
if ! asdf plugin-list | grep $plugin > /dev/null; then
echo "Installing asdf plugin $plugin"
asdf plugin-add $plugin
fi
done
asdf install
fi
# Use a virtual environment for Python.
layout python3
# Install Python packages.
python_packages="
black
boto_source_profile_mfa==0.0.9
flake8
isort
mkdocs
mypy
pytest
twine
-e pretf
-e pretf.aws
"
pip install --upgrade pip
pip install $python_packages | grep -v "Requirement already satisfied:" || true
# Add a terraform shim to run Pretf instead of Terraform.
PATH_add "$(
mkdir -p .direnv/bin &&
cd $_ &&
ln -fs $(which terraform) tf &&
ln -fs $(which pretf) terraform &&
pwd
)"