Skip to content

Commit bccc93f

Browse files
committed
A few more changes
1 parent dfbd47b commit bccc93f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

make

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,21 @@ def merge_git():
139139
shutil.copyfile('build/index.html', 'index.html')
140140
shutil.rmtree('build')
141141

142+
git = subprocess.Popen(['git', 'status'], stdout=subprocess.PIPE)
143+
result = git.communicate()[0].strip().split('\n')
144+
if not result[-1].startswith('nothing to commit'):
145+
print 'ERROR: Nothing to merge'
146+
return 1
147+
148+
print 'Adding changes...'
142149
subprocess.Popen(['git', 'add', '-A'],
143150
stdout=subprocess.PIPE).communicate()
144151

152+
print 'Committing...'
145153
subprocess.Popen(['git', 'commit', '-m', 'Automatic merge from master.'],
146154
stdout=subprocess.PIPE).communicate()
147155

156+
print 'Commit successful'
148157
return 0
149158

150159
else:

0 commit comments

Comments
 (0)