]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/git.py
Use CLI installer for MediaWiki 1.17.0 and later.
[wizard.git] / wizard / git.py
index aaea68ddb070a7bf15f2d086ad7dca0a66e1d9c9..965327b4caa59b4c33310b60ee5dac38260aebd2 100644 (file)
@@ -2,9 +2,21 @@
 Helper functions for dealing with Git.
 """
 
-from wizard import shell
+from wizard import shell, util
 
 def describe():
     """Finds the output of git describe --tags of the current directory."""
-    return shell.Shell().safeCall("git", "describe", "--tags")[0].rstrip()
+    return shell.safeCall("git", "describe", "--tags", strip=True)
 
+def commit_configure():
+    """
+    Performs a commit of changes performed during configuration of an install
+    with an appropriate logfile message.
+    """
+    message = "Autoinstall configuration.\n\n%s" % util.get_git_footer()
+    util.set_git_env()
+    try:
+        message += "\nConfigured-by: " + util.get_operator_git()
+    except util.NoOperatorInfo:
+        pass
+    shell.call("git", "commit", "--allow-empty", "-a", "-m", message)