File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed
Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 11* .swp
2+ * .pyc
23js /mobile.js
34js /init_plot.js
45css /mobile.css
Original file line number Diff line number Diff line change 1+ from fabric .api import *
2+
3+ env .use_ssh_config = True
4+ env .hosts = ['kraken.habhub.org' ]
5+
6+ def get_user ():
7+ env .user = prompt ("Username to use?" , default = env .user )
8+
9+ def stage_master ():
10+ result = local ('git branch' , capture = True );
11+
12+ for line in result .split ('\n ' ):
13+ if line [0 ] == '*' :
14+ branch = line .split (' ' )[1 ]
15+ break
16+
17+ if branch == "master" :
18+ print "Already on master branch."
19+ return
20+
21+ local ("git checkout master" )
22+ local ("git merge %s" % branch )
23+ local ("git checkout %s" % branch )
24+ local ("git push -f origin" )
25+ local ("git push -f ukhas" )
26+
27+ def deploy ():
28+ get_user ();
29+ wd = "/var/www/habitat/mobile-tracker/"
30+
31+ with settings (warn_only = True ):
32+ if run ("test -d %s" % wd ).failed :
33+ print "Cannot locate %s" % wd
34+ return
35+
36+ with cd (wd ):
37+ run ("git reset --hard" )
38+ run ("git pull" )
39+ run ("./build.sh" )
40+
41+ def build ():
42+ local ("./build.sh" )
You can’t perform that action at this time.
0 commit comments