-
Notifications
You must be signed in to change notification settings - Fork 68
/
fabfile.py
28 lines (23 loc) · 1016 Bytes
/
fabfile.py
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
# Copyright (c) 2018 Dolphin Emulator Website Contributors
# SPDX-License-Identifier: MIT
from fabric import task
_HOSTS = ["[email protected]"]
def deploy(c, root, branch):
activate = "source /home/dolphin-emu/venv/www/bin/activate"
with c.cd(root):
c.run("git fetch")
c.run("git checkout %s" % branch)
c.run("git reset --hard origin/%s" % branch)
c.run(activate + " && pip install -r requirements.txt")
c.run(activate + " && python manage.py collectstatic --noinput")
with c.cd("dolweb"):
c.run("msgfmt localefixes/locale/ko/LC_MESSAGES/django.po -o "
"localefixes/locale/ko/LC_MESSAGES/django.mo")
c.run(activate + " && django-admin compilemessages")
c.run("scripts/restart-apps.sh")
@task(hosts=_HOSTS)
def deploy_stable(c):
deploy(c, "/home/dolphin-emu/apps/www", "stable")
@task(hosts=_HOSTS)
def deploy_dev(c):
deploy(c, "/home/dolphin-emu/apps/devwww", "master")