forked from expo/expo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.envrc
48 lines (38 loc) · 1.03 KB
/
.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
44
45
46
47
48
PATH_add bin
export EXPO_ROOT_DIR=`pwd`
# ANDROID_HOME should be replaced with ANDROID_SDK_ROOT as soon as RN stops using it for its buildscripts
export ANDROID_HOME="${ANDROID_SDK_ROOT:=$ANDROID_SDK}"
# Force all Expo modules to be compiled from source
export EXPO_USE_SOURCE=1
source_local() {
file=./.envrc.local
if [[ -f "$file" ]]; then
source_env "$file"
fi
watch_file "$file"
}
source_secrets() {
file=$1
if [[ -f "$file" ]] && head -1 "$file" | grep --quiet "#!"; then
source_env "$file"
fi
watch_file "$file"
}
install_git_hooks() {
for path in scripts/git-hooks/*; do
filename=$(basename $path)
ln -sf "../../scripts/git-hooks/$filename" ".git/hooks/$filename"
done
}
use_ruby() {
local required_version=$1
if ! ruby -v | grep -q "ruby $required_version"; then
log_error "Ruby $required_version is required. Please install it using your Ruby version manager like rbenv or rvm."
exit 1
fi
layout ruby
}
source_secrets secrets/expotools.env
source_local
install_git_hooks
use_ruby "3.3"