Skip to content

Commit 91c33dc

Browse files
committed
2 parents c9f73b0 + ef461c1 commit 91c33dc

2 files changed

Lines changed: 18 additions & 15 deletions

File tree

frontend/setup_flutter.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
if [ ! -d "$HOME/flutter" ]; then
5+
curl -L https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.38.7-stable.tar.xz -o /tmp/flutter.tar.xz
6+
mkdir -p "$HOME/flutter-sdk"
7+
tar xf /tmp/flutter.tar.xz -C "$HOME/flutter-sdk"
8+
mv "$HOME/flutter-sdk/flutter" "$HOME/flutter"
9+
fi
10+
11+
export PATH="$PATH:$HOME/flutter/bin"
12+
git config --global --add safe.directory "$HOME/flutter"
13+
flutter config --no-analytics
14+
flutter pub get

frontend/vercel.json

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
{
2-
"projectName": "trash-tracker-frontend",
3-
"buildCommand": "flutter build web --release --dart-define=API_BASE_URL=$API_BASE_URL",
2+
"framework": null,
3+
"installCommand": "bash setup_flutter.sh",
4+
"buildCommand": "export PATH=\"$PATH:$HOME/flutter/bin\" && flutter build web --release --dart-define=API_BASE_URL=$https://sankalan.onrender.com/api/",
45
"outputDirectory": "build/web",
5-
"installCommand": "flutter pub get",
6-
"framework": "other",
7-
"env": [
8-
{
9-
"key": "API_BASE_URL",
10-
"value": "@api-base-url"
11-
}
12-
],
136
"routes": [
14-
{
15-
"src": "/(.*)",
16-
"dest": "/index.html",
17-
"status": 200
18-
}
7+
{ "src": "/(.*)", "dest": "/index.html", "status": 200 }
198
]
209
}

0 commit comments

Comments
 (0)