Skip to content

Commit

Permalink
A few more changes
Browse files Browse the repository at this point in the history
  • Loading branch information
BonsaiDen committed Feb 13, 2011
1 parent dfbd47b commit bccc93f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions make
Expand Up @@ -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:
Expand Down

0 comments on commit bccc93f

Please sign in to comment.