forked from doonfrs/pluto_grid_plus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-demo.sh
More file actions
50 lines (35 loc) · 816 Bytes
/
deploy-demo.sh
File metadata and controls
50 lines (35 loc) · 816 Bytes
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
50
#!/bin/bash
set -e
BRANCH="gh-pages"
DEMO_DIR="demo"
BUILD_DIR="$DEMO_DIR/build/web"
echo "🚀 Building Flutter Web Demo..."
git checkout master
git pull origin master
cd $DEMO_DIR
flutter pub get
flutter build web --release
cd ..
echo "Build Completed!"
git checkout $BRANCH
echo "Preventing build folder from being deleted..."
mv $BUILD_DIR /tmp/build_web
echo "Cleaning old deployment files..."
rm -rf ../pluto_grid_plus/*
rm -rf .dart_tool
echo "🔁 Moving demo build files to the repository root..."
mv /tmp/build_web/* .
rm -rf /tmp/build_web
git add .
git commit -m "🚀 Deploy updated Flutter Web Demo"
git push origin $BRANCH
git checkout master
flutter pub get
cd demo
flutter pub get
cd ..
cd packages/pluto_grid_plus_export
flutter pub get
cd ..
cd ..
echo "🎉 Deployment Completed!"