-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.envrc
40 lines (33 loc) · 1005 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
# vim: et:ts=2:sw=2:tw=0:wm=0:fdm=marker:ft=bash
RED="\e[31m"
ENDCOLOR="\e[0m"
if has git && git status && [[ $(git stash list | wc -l) -ge 1 ]]; then
echo -e "\n"
echo -e "${RED}------------------${ENDCOLOR}"
echo -e "${RED}There are stashes:${ENDCOLOR}"
git stash list | cat
echo -e "${RED}------------------${ENDCOLOR}"
echo -e "\n"
fi
strict_env
PATH_add "./bin"
PATH_add "./scripts"
[[ ! -f .dev.env ]] && echo -e "\nIt seems you don't have a dev.env file locally. We need this to run.\n"
case "${STLU_ENV:-dev}" in
dev*)
echo "Loading .dev.env"
dotenv_if_exists "./.dev.env"
;;
int*)
echo "Loading .int.env"
dotenv_if_exists "./.int.env"
;;
prod*)
echo "Loading .prod.env"
dotenv_if_exists "./.prod.env"
;;
esac
# Add your local changes into the .envrc.local, which is a full blown .envrc file
# You can find the available commands here: https://direnv.net/man/direnv-stdlib.1.html
echo "Loading .envrc.local"
dotenv_if_exists "./.envrc.local"