File tree Expand file tree Collapse file tree 3 files changed +73
-0
lines changed
Expand file tree Collapse file tree 3 files changed +73
-0
lines changed Original file line number Diff line number Diff line change @@ -16,3 +16,6 @@ __pycache__/
1616# Other
1717.DS_Store
1818lcmtypes /* .py
19+
20+ # Release tars.
21+ * .tar.gz
Original file line number Diff line number Diff line change 1+ # MBot Web App Release
2+
3+ To install the web app, first unpack this file with:
4+
5+ tar -xvzf mbot_web_app-[VERSION].tar.gz
6+ cd mbot_web_app-[VERSION]
7+
8+ Then install the dependencies and deploy:
9+
10+ ./install_nginx.sh
11+ ./install_python_deps.sh
12+ ./deploy_app.sh --no-rebuild
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e # Quit on error.
3+
4+ VERSION=" "
5+
6+ while getopts " :v:" opt; do
7+ case $opt in
8+ v)
9+ VERSION=$OPTARG
10+ ;;
11+ \? )
12+ echo " Invalid option: -$OPTARG "
13+ ;;
14+ esac
15+ done
16+
17+ if [ -z " $VERSION " ]; then
18+ echo " Error: Version is required. Usage:"
19+ echo
20+ echo " ./generate_release.sh -v vX.X.X"
21+ echo
22+ exit 1
23+ fi
24+
25+ echo " Building for version $VERSION "
26+
27+ # Build the webapp.
28+ echo " #############################"
29+ echo " Building the webapp..."
30+ echo " #############################"
31+ npm install
32+ npm run build
33+
34+ # Make a new top level directory and copy everything into it.
35+ INCLUDES=" dist/ app/ config/ \
36+ scripts/install_nginx.sh \
37+ scripts/install_python_deps.sh \
38+ scripts/deploy_app.sh \
39+ mbot_omni_app.py
40+ requirements.txt"
41+ FILE_NAME=mbot_web_app-$VERSION .tar.gz
42+
43+ mkdir mbot_web_app-$VERSION
44+ for file in $INCLUDES ; do
45+ cp -r $file mbot_web_app-$VERSION /
46+ done
47+
48+ # Copy the README.
49+ cp scripts/deploy_readme.txt mbot_web_app-$VERSION /README.txt
50+
51+ echo
52+ echo " Creating tar file..."
53+ tar -czf $FILE_NAME mbot_web_app-$VERSION /
54+
55+ rm -rf mkdir mbot_web_app-$VERSION
56+
57+ echo
58+ echo " Created release: $FILE_NAME "
You can’t perform that action at this time.
0 commit comments