-
Notifications
You must be signed in to change notification settings - Fork 29
/
post-merge-demos
executable file
·31 lines (30 loc) · 1.03 KB
/
post-merge-demos
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
#!/bin/bash
# activate the virtualenv
. ~/envs/coweb_demo_latest/bin/activate
# reinstall coweb to the env
cd ~/src/coweb
git pull origin master
cd servers/python
pip install .
# deploy the cowebx demos to the env
cd ~/src/cowebx/cowebx-apps
python setup.py deploy ~/envs/coweb_demo_latest --force
# restore the custom run script
cd ~/envs/coweb_demo_latest/bin
cp run_server.py.bak run_server.py
# update cowebConfig in demos
cd ~/envs/coweb_demo_latest/www
for name in dailyscrum/main.js comap/main.js colist/main.js; do
echo $name
sed -e 's/^var cowebConfig.*/var cowebConfig = \{ adminUrl \: "\.\.\/admin", baseUrl \: "\/latest" \};/' < "$name" > "${name}.new"
mv "${name}.new" "$name"
done
# copy dojo / dijit / dojox into place for dailyscrum app
cp -r ~/src/dojo ~/envs/coweb_demo_latest/www/dailyscrum/
cp -r ~/src/dijit ~/envs/coweb_demo_latest/www/dailyscrum/
cp -r ~/src/dojox ~/envs/coweb_demo_latest/www/dailyscrum/
# deactivate the virtualenv
deactivate
# restart the demo server process
cd ~
supervisorctl restart coweb_demo_latest