]> scripts.mit.edu Git - wizard.git/commitdiff
Fix detectVersion bug, make unsupported nicer.
authorEdward Z. Yang <ezyang@mit.edu>
Sun, 10 Jan 2010 05:55:03 +0000 (00:55 -0500)
committerEdward Z. Yang <ezyang@mit.edu>
Sun, 10 Jan 2010 05:55:03 +0000 (00:55 -0500)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
wizard/command/summary/unsupported.py
wizard/deploy.py

index 6c2ee7b50e0813c77fab8c6171a5b848a8f70f8a..1ca658decc5b9914157ef4e1a0198ced451c7e4c 100644 (file)
@@ -11,10 +11,15 @@ def main(argv, baton):
     tags = set(shell.eval("git", "--git-dir=" + application.repository(options.srv_path), "tag").strip().split())
     unsupported = set()
     for d in deploy.parse_install_lines(appname, options.versions_path):
-        version = d.detectVersion()
+        try:
+            version = d.detectVersion()
+        except IOError:
+            continue
         if "wordpress-%s" % version not in tags:
-            unsupported.add(version)
-    for v in unsupported:
+            print version
+            unsupported.add(str(version))
+    print "SUMMARY:"
+    for v in sorted(distutils.version.LooseVersion(x) for x in list(unsupported)):
         print v
 
 def parse_args(argv, baton):
@@ -30,5 +35,7 @@ since Git may lie if the user manually upgraded their install."""
     options, args = parser.parse_all(argv)
     if len(args) > 1:
         parser.error("too many arguments")
+    if len(args) < 1:
+        parser.error("must specify application")
     return options, args
 
index a748f1b78aaf82d2701c1f1a684465c3643c052f..613e095a22d3d658a5a727c94a834b39bd12647b 100644 (file)
@@ -199,7 +199,6 @@ class Deployment(object):
         if not str(real) == self.app_version.pristine_tag.partition('-')[2]:
             raise VersionMismatchError(real, self.version)
 
-    @property
     @chdir_to_location
     def detectVersion(self):
         """