import re
+import distutils.version
import os
from wizard import app, deploy, install, shell, util
return handler
def checkConfig(self, deployment):
return os.path.isfile(os.path.join(deployment.location, "LocalSettings.php"))
+ def detectVersion(self, deployment):
+ contents = deployment.read("includes/DefaultSettings.php")
+ regex = make_filename_regex("wgVersion")[1]
+ match = regex.search(contents)
+ if not match: return None
+ return distutils.version.LooseVersion(match.group(2)[1:-1])
def install(self, options):
try:
os.unlink("LocalSettings.php")