-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sh
45 lines (37 loc) · 774 Bytes
/
build.sh
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
# Build
# This will copy the built resources to the build director ./dist.
# Run `sh ./build.sh`
# Clean previous build
echo "Clean ./dist"
rm -rf ./dist
mkdir ./dist
# Build server
echo "Build Server"
cd ./server
pwd
# Fetch the Dependencies
pub get
cd ..
# Build app
echo "Build Client"
cd ./client
pwd
# Fetch the flutter/dart dependencies
flutter pub get
# Used with Travis flutter
flutter build web
cd ..
# Build server in the ./dist directory
# Copy the server resources (dart web server)
echo "Copy Resources to ./dist"
pwd
ls
cp -R ./server/* ./dist
# Copy the client resources (flutter app)
cp -R ./client/build/web/* ./dist/html
# Fix packages override wiring
echo "Update dist/server dart packaging"
cd ./dist
pub get
cd ..
echo "Finished building...";