-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.envrc
More file actions
25 lines (20 loc) · 768 Bytes
/
Copy path.envrc
File metadata and controls
25 lines (20 loc) · 768 Bytes
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
if [ -f .env ]; then
dotenv
fi
export BUF_CACHE_DIR="$PWD/.buf-cache"
expected_repo_name="$(awk -F'[][.]' '/^\[venv\./{print $3; exit}' devenv/config.ini 2>/dev/null)"
if [ -n "$expected_repo_name" ] && [ "$(basename "$PWD")" != "$expected_repo_name" ]; then
echo "direnv: worktree basename '$(basename "$PWD")' does not match expected '$expected_repo_name'."
echo "direnv: skipping devenv sync. Move this checkout to a path ending in '/$expected_repo_name'."
elif ! command -v "devenv" >/dev/null; then
echo 'Sentry devenv can help simplify dev environment management.
Try out with an install from:
https://github.com/getsentry/devenv#install
'
else
devenv sync
fi
if [ -f .venv/bin/activate ]; then
source .venv/bin/activate
fi
pre-commit install