diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-11-27 10:16:06 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-11-27 10:16:06 +0200 |
commit | 57c46eff8a61a56658242306d139e86b84f01f5d (patch) | |
tree | c45520aa7d8894f43d7660a0c35da0fc69053b90 | |
parent | fbc56b5be6443bc681ab67283ab7a3e68b3d68c9 (diff) | |
download | Servo-57c46eff8a61a56658242306d139e86b84f01f5d.tar.gz Servo-57c46eff8a61a56658242306d139e86b84f01f5d.tar.bz2 Servo-57c46eff8a61a56658242306d139e86b84f01f5d.zip |
Added self update
-rw-r--r-- | servo/management/commands/selfupdate.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/servo/management/commands/selfupdate.py b/servo/management/commands/selfupdate.py new file mode 100644 index 0000000..d985041 --- /dev/null +++ b/servo/management/commands/selfupdate.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +import os.path +from subprocess import call +from django.conf import settings +from django.core.management.base import BaseCommand + + +class Command(BaseCommand): + + help = "Updates this Servo installation" + + def handle(self, *args, **options): + mc = os.path.join(settings.BASE_DIR, 'manage.py') + call(['git', 'pull', 'origin', 'master']) + call([mc, 'migrate', '--no-initial-data']) + call([mc, 'clearsessions']) |