Beispiel #1
0
def test_versions():
    """All blueprints in this branch should be the same Cloudify version.
    """
    try:
        assert get_cloudify_version() is not None
    except VersionsException as e:
        pytest.fail("Failed to verify that branch "
                    "versions are the same: {0}.".format(str(e)))
Beispiel #2
0
def get_blueprints_version():
    blueprints_version = get_cloudify_version()
    version = get_last_version()
    logging.info(
        'Old version: {0}. New version: {1}'.format(
            blueprints_version, version))
    version = blueprints_version if blueprints_version > version else version
    try:
        _version = '{0}-{1}'.format(version.split('-')[0], str(int(version.split('-')[1]) + 1))
    except IndexError:
        _version = '{0}-{1}'.format(version, str(0))
    return _version
 def version(self):
     if self._version:
         return self._version
     blueprints_version = get_cloudify_version()
     version = self._get_last_version()
     logging.info('Old version: {0}. New version: {1}'.format(
         blueprints_version, version))
     if blueprints_version > version:
         version = blueprints_version
     try:
         self._version = '{0}-{1}'.format(
             version.split('-')[0], str(int(version.split('-')[1]) + 1))
     except IndexError:
         self._version = '{0}-{1}'.format(version, str(0))
     return self._version