]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/deploy.py
Implement 'git summary unsupported'
[wizard.git] / wizard / deploy.py
index 67c4118e0b7c37741a97e5ad7658bdde62b6014a..a748f1b78aaf82d2701c1f1a684465c3643c052f 100644 (file)
@@ -195,11 +195,23 @@ class Deployment(object):
         Checks if our version and the version number recorded in a file
         are consistent.
         """
+        real = self.detectVersion()
+        if not str(real) == self.app_version.pristine_tag.partition('-')[2]:
+            raise VersionMismatchError(real, self.version)
+
+    @property
+    @chdir_to_location
+    def detectVersion(self):
+        """
+        Returns the real version, based on filesystem, of install.
+
+        Throws a :class:`VersionDetectionError` if we couldn't figure out
+        what the real version was.
+        """
         real = self.application.detectVersion(self)
         if not real:
             raise VersionDetectionError
-        elif not str(real) == self.app_version.pristine_tag.partition('-')[2]:
-            raise VersionMismatchError(real, self.version)
+        return real
 
     @property
     @chdir_to_location