Permalink
Browse files

A few more changes

  • Loading branch information...
1 parent dfbd47b commit bccc93f587b03cdd9f889655543792ef372a7870 @BonsaiDen committed Feb 13, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 make
View
9 make
@@ -139,12 +139,21 @@ def merge_git():
shutil.copyfile('build/index.html', 'index.html')
shutil.rmtree('build')
+ git = subprocess.Popen(['git', 'status'], stdout=subprocess.PIPE)
+ result = git.communicate()[0].strip().split('\n')
+ if not result[-1].startswith('nothing to commit'):
+ print 'ERROR: Nothing to merge'
+ return 1
+
+ print 'Adding changes...'
subprocess.Popen(['git', 'add', '-A'],
stdout=subprocess.PIPE).communicate()
+ print 'Committing...'
subprocess.Popen(['git', 'commit', '-m', 'Automatic merge from master.'],
stdout=subprocess.PIPE).communicate()
+ print 'Commit successful'
return 0
else:

0 comments on commit bccc93f

Please sign in to comment.