| author | ymh <ymh.work@gmail.com> |
| Fri, 19 Jul 2024 09:38:03 +0200 | |
| changeset 704 | b5835dca2624 |
| parent 350 | 4f2fe8731353 |
| permissions | -rwxr-xr-x |
| 136 | 1 |
#!/usr/bin/env bash |
2 |
set -e |
|
3 |
if [ -d ~/tmp/hdalab_V$1 ]; then |
|
4 |
rm -fr ~/tmp/hdalab_V$1; |
|
5 |
fi |
|
6 |
||
7 |
hg archive -r V$1 ~/tmp/hdalab_V$1 |
|
8 |
||
9 |
#text2unix ~/tmp/hdalab_V$1 |
|
10 |
||
11 |
if [ -d ~/tmp/hdalab_V$1 ]; then |
|
|
350
4f2fe8731353
add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
145
diff
changeset
|
12 |
cat <<EOT | rsync -Cvrlz --delete --filter=". -" ~/tmp/hdalab_V$1/web/ iri@web.iri.centrepompidou.fr:/iridata/www/iri-research/labs/hdalab/ |
| 136 | 13 |
+ core |
14 |
P .htpasswd |
|
15 |
P hdalab/config.py |
|
16 |
P robots.txt |
|
17 |
P env/*** |
|
18 |
P log/*** |
|
19 |
P index/*** |
|
20 |
P static/media/*** |
|
21 |
EOT |
|
22 |
fi |
|
23 |
||
24 |
if [ -d ~/tmp/hdalab_V$1 ]; then |
|
25 |
echo "Deleting temp export" |
|
26 |
rm -fr ~/tmp/hdalab_V$1; |
|
27 |
fi |
|
28 |
||
|
350
4f2fe8731353
add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
145
diff
changeset
|
29 |
ssh iri@web.iri.centrepompidou.fr "export PYTHONPATH=/iridata/www/iri-research/labs/hdalab && source /iridata/virtualenv/hdalab2/bin/activate && cd /iridata/www/iri-research/labs/hdalab/hdalab && django-admin.py collectstatic --noinput" |
| 136 | 30 |
ssh iri@web.iri.centrepompidou.fr sudo apache2ctl restart |