Exemple #1
0
    def fail_on_unknown_version(version, properties):
        versions = Versions()
        version_loader = VersionLoader(versions)
        version_loader.load(properties)
        versions.sort()

        if not versions.exists(Version(version)):
            message = "the given version is not valid for this project"
            raise PluginException(message)
Exemple #2
0
    def fail_on_unknown_version(version, properties):
        """Verify that ``version`` is valid for this project"""
        versions = Versions()
        version_loader = VersionLoader(versions)
        version_loader.load(properties)
        versions.sort()

        if not versions.exists(Version(version)):
            raise UnknownVersionException(
                "version {} is not valid for this project".format(version))