-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_vercel.sh
45 lines (45 loc) · 964 Bytes
/
run_vercel.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
#!/bin/sh
if [ "$1" = "deactivate" ]; then
cd fynapp_api ;
deactivate ;
fi
if [[ "$1" != "deactivate" && "$1" != "pipfile" && "$1" != "clean" ]]; then
set -o allexport; . "./.env"; set +o allexport ;
python3 -m venv fynapp_api ;
. fynapp_api/bin/activate ;
cd fynapp_api ;
pip3 install -r requirements.txt ;
fi
if [ "$1" = "pipfile" ]; then
deactivate ;
pipenv lock
fi
if [ "$1" = "deploy" ]; then
cd ..
vercel ;
fi
if [ "$1" = "deploy_prod" ]; then
cd ..
vercel --prod ;
fi
if [ "$1" = "rename_staging" ]; then
cd ..
vercel alias $2 fynapp-staging-tomkat-cr.vercel.app
fi
if [[ "$1" = "" || "$1" = "vercel" ]]; then
cd ..
vercel dev --listen 0.0.0.0:5001 ;
fi
if [ "$1" = "clean" ]; then
echo "Cleaning..."
deactivate ;
rm -rf __pycache__ ;
rm -rf bin ;
rm -rf include ;
rm -rf lib ;
rm -rf pyvenv.cfg ;
ls -lah
fi
if [ "$1" = "flask" ]; then
flask run ;
fi