]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/install.py
Fix bug where php.ini not being rewritten for MediaWiki.
[wizard.git] / wizard / command / install.py
index efbaaa64d4df230917b5d02620250a085750633b..df972d5c0eb7cc694af32c1cce0b5037aaae20b8 100644 (file)
@@ -49,22 +49,30 @@ Autoinstalls the application %s in the directory DIR.""" % (appname, appname))
         shell.call("git", "clone", "-q", "--shared", application.repository(old_options.srv_path), dir)
     else:
         logging.info("Skipped clone")
+    wizard_dir = ".wizard"
     with util.ChangeDirectory(dir):
-        if not old_options.retry and version and version != "head-scripts": # for ease in testing
+        util.init_wizard_dir()
+        if not old_options.retry and version:
             shell.call("git", "reset", "-q", "--hard", appstr)
         input.infobox("Installing...")
-        if not version:
-            version = application.detectVersionFromGit(appname, appname + "-")
-        v = distutils.version.LooseVersion(version)
+        if not version: # figure out what version we're installing
+            v = application.detectVersionFromGit(appname + "-*", appname + "-")
+            logging.info("Installing latest version: %s", version)
+        else:
+            v = distutils.version.LooseVersion(version)
         if application.needs_web_stub:
             application.install(v, options, web_stub_path)
         else:
             application.install(v, options)
         if not old_options.no_commit:
             git.commit_configure()
-    if not hasattr(options, "web_inferred"):
-        open(os.path.join(dir, ".scripts/url"), "w").write("http://%s%s" % (options.web_host, options.web_path)) # XXX: no support for https yet!
-    input.infobox("Congratulations, your new install is now accessible at:\n\nhttp://%s%s" % (options.web_host, options.web_path), width=80)
+    # This should be on a per-application basis
+    #if not hasattr(options, "web_inferred"):
+    #    open(os.path.join(dir, os.path.join(wizard_dir, "url")), "w") \
+    #        .write("http://%s%s" % (options.web_host, options.web_path)) # XXX: no support for https yet!
+
+    input.infobox("Congratulations, your new install is now accessible at:\n\nhttp://%s%s" \
+            % (options.web_host, options.web_path), width=80)
 
 def configure_parser(parser, baton):
     parser.add_option("--prompt", dest="prompt", action="store_true",
@@ -72,7 +80,7 @@ def configure_parser(parser, baton):
     parser.add_option("--non-interactive", dest="non_interactive", action="store_true",
             default=False, help="Force program to be non-interactive and use SETUPARGS.  Use --help with APP to find argument names.")
     parser.add_option("--no-commit", dest="no_commit", action="store_true",
-            default=command.boolish(os.getenv("WIZARD_NO_COMMIT")), help="Do not generate an 'installation commit' after configuring the application. Envvar is WIZARD_NO_COMMIT")
+            default=util.boolish(os.getenv("WIZARD_NO_COMMIT")), help="Do not generate an 'installation commit' after configuring the application. Envvar is WIZARD_NO_COMMIT")
     parser.add_option("--retry", dest="retry", action="store_true",
             default=False, help="Do not complain if directory already exists and reinstall application.")
     baton.push(parser, "srv_path")