forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·49 lines (40 loc) · 1.63 KB
/
test.sh
File metadata and controls
executable file
·49 lines (40 loc) · 1.63 KB
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
49
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$ROOT_DIR"
missing_files=()
required_files=(
"lib/firebase_options_dev.dart"
"lib/firebase_options_prod.dart"
"lib/env/dev_env.g.dart"
"lib/env/prod_env.g.dart"
)
for file in "${required_files[@]}"; do
if [[ ! -f "$file" ]]; then
missing_files+=("$file")
fi
done
if [[ ${#missing_files[@]} -gt 0 ]]; then
echo "Missing generated files: ${missing_files[*]}"
echo "Running setup prerequisites..."
mkdir -p android/app/src/dev/ ios/Config/Dev/ ios/Runner/ macos/ macos/Config/Dev
cp setup/prebuilt/firebase_options.dart lib/firebase_options_dev.dart
cp setup/prebuilt/google-services.json android/app/src/dev/
cp setup/prebuilt/GoogleService-Info.plist ios/Config/Dev/
cp setup/prebuilt/GoogleService-Info.plist ios/Runner/
cp setup/prebuilt/GoogleService-Info.plist macos/
cp setup/prebuilt/GoogleService-Info.plist macos/Config/Dev/
mkdir -p android/app/src/prod/ ios/Config/Prod/ macos/Config/Prod
cp setup/prebuilt/firebase_options.dart lib/firebase_options_prod.dart
cp setup/prebuilt/google-services.json android/app/src/prod/
cp setup/prebuilt/GoogleService-Info.plist ios/Config/Prod/
cp setup/prebuilt/GoogleService-Info.plist macos/Config/Prod/
echo "API_BASE_URL=https://api.omiapi.com/" > .dev.env
echo "USE_WEB_AUTH=true" >> .dev.env
echo "USE_AUTH_CUSTOM_TOKEN=true" >> .dev.env
flutter pub get
dart run build_runner build --delete-conflicting-outputs
fi
flutter test test/providers/capture_provider_test.dart
flutter test test/widgets/transcript_test.dart
flutter test test/unit/audio_player_utils_test.dart