]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/configure.py
Fix bugs with new reporting code.
[wizard.git] / wizard / command / configure.py
index efb1b7bda7cbc52991ae317e2fd5489f3ecd74ad..1ac7ea7734c80eb7d86695c08dd88c820b63af85 100644 (file)
@@ -1,8 +1,9 @@
 import logging
 import optparse
 import sys
+import distutils.version
 
-from wizard import command, deploy, git
+from wizard import command, deploy, git, shell, util
 
 def main(argv, baton):
 
@@ -29,6 +30,7 @@ This is a plumbing command, normal users should use
             application = args[0]
         except IndexError:
             parser.error("Use 'wizard configure --help APP' to see APP-specific options.")
+        version = None # not relevant
     else:
         tag = git.describe()
         application, _, version = tag.partition('-')
@@ -41,5 +43,14 @@ This is a plumbing command, normal users should use
     options, args = parser.parse_all(argv)
     handler.handle(options)
 
-    app.install(options)
+    app.install(distutils.version.LooseVersion(version), options)
+
+    sh = shell.Shell()
+    message = "Autoinstall configuration of %s locker.\n\n%s" % (util.get_dir_owner(), util.get_git_footer())
+    util.set_git_env()
+    try:
+        message += "\nConfigured-by: " + util.get_operator_git()
+    except util.NoOperatorInfo:
+        pass
+    sh.call("git", "commit", "--allow-empty", "-a", "-m", message)