]> projects.mako.cc - iron-blogger/blobdiff - weekly-update.py
payment from mayo
[iron-blogger] / weekly-update.py
index acfc17bb8c0d67a760467e6e197e1cf4f28e9ed1..284ffb6056a9bf3fee868a3005bafc7bdd917d27 100755 (executable)
@@ -81,5 +81,13 @@ if punt:
     with open('bloggers.yml','w') as b:
         yaml.safe_dump(bloggers, b)
 
     with open('bloggers.yml','w') as b:
         yaml.safe_dump(bloggers, b)
 
-    subprocess.check_call(["git", "commit", "ledger", "bloggers.yml",
-                           "-m", "Punts for %s" % (today,)])
+    if not dry_run:
+        subprocess.check_call(["git", "commit", "ledger", "bloggers.yml",
+                               "-m", "Punts for %s" % (today,)])
+
+# if it's a dry run, lets set the ledger back to the beginning state
+if dry_run:
+    subprocess.check_call(["git", "checkout", "ledger"])
+    
+    if punt:
+        subprocess.check_call(["git", "checkout", "bloggers.yml"])

Benjamin Mako Hill || Want to submit a patch?