File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -96,18 +96,21 @@ def merge_pages():
96
96
print 'Files copied sucessfully'
97
97
98
98
print 'Switching to gh-pages...'
99
- git = subprocess .Popen (['git' , 'checkout' , ' gh-pages' ],
99
+ git = subprocess .Popen (['git' , 'checkout gh-pages' ],
100
100
stdout = subprocess .PIPE )
101
101
102
- print git .communicate ()
103
102
status = merge_git ()
104
103
105
104
print 'Returning to master...'
106
- git = subprocess .Popen (['git' , 'checkout' , ' master' ],
105
+ git = subprocess .Popen (['git' , 'checkout master' ],
107
106
stdout = subprocess .PIPE )
108
107
109
- print git .communicate ()
110
- return status
108
+ if git .communicate ()[0 ].strip () == 'Aborting' :
109
+ print 'ERROR: Automatic commit failed. Please commit to gh-pages manually'
110
+ return 1
111
+
112
+ else :
113
+ return status
111
114
112
115
else :
113
116
print 'ERROR: Failed to remove old build directory'
You can’t perform that action at this time.
0 commit comments