-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathfabfile.py
51 lines (39 loc) · 1.19 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# -*- coding: utf-8 -*-
from __future__ import with_statement
from fabric import *
def check_deploy():
local('python manage.py check --deploy')
def create_superuser():
local('python manage.py createsuperuser')
# @hosts(['[email protected]'])
# def deploy_dev():
# with cd('/var/www/dsp-explorer'):
# run('git checkout .')
# run('git pull')
# run('npm run prod')
# run('fab install_static')
# run('service apache2 reload')
#
#
# @hosts(['[email protected]'])
# def deploy_branch(branch):
# with cd('/var/www/dsp-explorer'):
# run('git checkout %s' % branch)
# run('git pull')
# run('fab install')
# run('fab migrate')
# run('npm run prod')
# run('fab install_static')
# run('service apache2 reload')
# fab release:'RELEASE-COMMIT-MESSAGE'
def release(message):
local('git checkout release')
local('git merge master')
local('npm install')
local('npm run prod')
local('fab install_static')
#local('git commit -am "%s"' % message)
local('git push')
local('git checkout master')
def pair_crm_ids():
local('python ./capsule_crm.py pair_crm_ids')