weekly-update: Automatically commit ledger

This commit is contained in:
Nelson Elhage 2010-05-14 15:34:02 -04:00
parent 022f18d9ce
commit 8f3d6d3645
1 changed files with 4 additions and 0 deletions

View File

@ -19,8 +19,12 @@ finally:
x = xmlrpclib.ServerProxy(XMLRPC_ENDPOINT)
with open('ledger', 'a') as f:
f.write("\n")
f.write(render.render_template('templates/ledger', sys.argv[1]))
subprocess.check_call(["git", "commit", "templates/ledger",
"-m", "Update for %s" % (sys.argv[1],)])
text = render.render_template('templates/week.tmpl', sys.argv[1])
lines = text.split("\n")