Skip to content

Commit e319d99

Browse files
chore(eas): build local
1 parent f4f88db commit e319d99

File tree

3 files changed

+45
-54
lines changed

3 files changed

+45
-54
lines changed

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"private": true,
55
"main": "expo-router/entry",
66
"scripts": {
7-
"eas-build-pre-install": "./source_env_local.sh",
87
"start": "cross-env EXPO_NO_DOTENV=1 expo start",
98
"prebuild": "cross-env EXPO_NO_DOTENV=1 pnpm expo prebuild",
109
"android": "cross-env EXPO_NO_DOTENV=1 expo run:android",
@@ -23,6 +22,8 @@
2322
"build:development:android": "cross-env APP_ENV=development EXPO_NO_DOTENV=1 eas build --profile development --platform android ",
2423
"build:staging:ios": "cross-env APP_ENV=staging EXPO_NO_DOTENV=1 eas build --profile staging --platform ios",
2524
"build:staging:android": "cross-env APP_ENV=staging EXPO_NO_DOTENV=1 eas build --profile staging --platform android ",
25+
"build:staging:ios:local": "cross-env APP_ENV=staging sh -c './set-env.sh EXPO_NO_DOTENV=1 eas build --profile staging --platform ios --local'",
26+
"build:staging:android:local": "cross-env APP_ENV=staging sh -c './set-env.sh EXPO_NO_DOTENV=1 eas build --profile staging --platform android --local'",
2627
"build:production:ios": "cross-env APP_ENV=production EXPO_NO_DOTENV=1 eas build --profile production --platform ios",
2728
"build:production:android": "cross-env APP_ENV=production EXPO_NO_DOTENV=1 eas build --profile production --platform android ",
2829
"postinstall": "husky install",
@@ -48,19 +49,19 @@
4849
"@tanstack/react-query": "^5.37.1",
4950
"app-icon-badge": "^0.0.15",
5051
"axios": "^1.7.1",
51-
"expo": "~51.0.25",
52-
"expo-build-properties": "~0.12.5",
52+
"expo": "~51.0.24",
53+
"expo-build-properties": "~0.12.4",
5354
"expo-constants": "~16.0.2",
5455
"expo-dev-client": "~4.0.21",
5556
"expo-font": "~12.0.9",
5657
"expo-image": "~1.12.13",
5758
"expo-linking": "~6.3.1",
5859
"expo-localization": "~15.0.3",
59-
"expo-router": "~3.5.21",
60+
"expo-router": "~3.5.20",
6061
"expo-splash-screen": "0.27.5",
6162
"expo-status-bar": "~1.12.1",
6263
"expo-system-ui": "~3.0.7",
63-
"expo-updates": "~0.25.22",
64+
"expo-updates": "~0.25.21",
6465
"i18next": "^22.5.1",
6566
"lodash.memoize": "^4.1.2",
6667
"moti": "^0.28.1",
@@ -70,7 +71,7 @@
7071
"react-error-boundary": "^3.1.4",
7172
"react-hook-form": "^7.51.4",
7273
"react-i18next": "^12.3.1",
73-
"react-native": "0.74.5",
74+
"react-native": "0.74.3",
7475
"react-native-avoid-softinput": "^4.0.2",
7576
"react-native-flash-message": "^0.4.2",
7677
"react-native-gesture-handler": "~2.16.2",

set-env.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
3+
# Check if the correct number of arguments is passed
4+
if [ $# -lt 1 ]; then
5+
echo "Usage: $0 <command>"
6+
exit 1
7+
fi
8+
9+
# Determine the env file based on the APP_ENV variable
10+
case "$APP_ENV" in
11+
development)
12+
ENV_FILE=".env.development"
13+
;;
14+
staging)
15+
ENV_FILE=".env.staging"
16+
;;
17+
production)
18+
ENV_FILE=".env.production"
19+
;;
20+
*)
21+
echo "Error: Unknown APP_ENV value: $APP_ENV"
22+
exit 1
23+
;;
24+
esac
25+
26+
# Check if the environment file exists
27+
if [ ! -f "$ENV_FILE" ]; then
28+
echo "Error: $ENV_FILE file does not exist."
29+
exit 1
30+
fi
31+
32+
# Load environment variables from the file
33+
set -o allexport
34+
source "$ENV_FILE"
35+
set -o allexport
36+
37+
# Run the command with the loaded environment variables
38+
eval "$@"

source_env_local.sh

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)