-
Notifications
You must be signed in to change notification settings - Fork 0
/
push.py
29 lines (22 loc) · 904 Bytes
/
push.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
#!/usr/bin/env python
import os
import sys
#Clear the display for a clean output
os.system('clear')
#Get the argument list
options = sys.argv[1:]
#Beginning Modules push to live from Avadhut DEV
if 'modules' in options or 'all' in options:
print 'Beginning Modules & Libraries folders push to live from Avadhut DEV...'
os.system('drush -v rsync @dev:%modules @live:%modules')
os.system('drush -v rsync @dev:%libraries @live:%libraries')
#Beginning SQL push to live from Avadhut DEV
if 'db' in options or 'all' in options:
print 'Beginning database push to live from Avadhut dev...'
os.system('drush -v sql-sync @dev @live')
#Beginning Themes push to live from Avadhut DEV
if 'themes' in options or 'all' in options:
print 'Beginning Themes folder push to live from Avadhut dev...'
os.system('drush -v rsync @dev:%themes @live:%themes')
#Clear remote cache
os.system('drush -v @live cc all')