Tests a manifest version number
186720
def validate_version(err, value, source):
    ''


    field_name = '<em:version>' if source == 'install.rdf' else 'version'

    err.metadata['version'] = value

    # May not be longer than 32 characters
    if len(value) > 32:
        err.error(
            ('metadata_helpers', '_test_version', 'too_long'),
            'The value of {name} is too long'.format(name=field_name),
            'Values supplied for {name} in the {source} file must be 32 '
            'characters or less.'.format(name=field_name, source=source),
            source)

    # Must be a valid version number.
    if not VERSION_PATTERN.match(value):
        err.error(
            ('metadata_helpers', '_test_version', 'invalid_format'),
            'The value of {name} is invalid'.format(name=field_name),
            'The values supplied for version in the {source} file is not a '
            'valid version string. It can only contain letters, numbers, and '
            'the symbols +*.-_.'.format(name=field_name, source=source),
            source)
748342
def check_version(version, range_=None):
    
    if range_ and version not in range_:
        raise RezBindError("found version %s is not within range %s"
                           % (str(version), str(range_)))
517333
function validateVersion()
    {
        $versionValidated = false;
        $ezversion = eZPublishSDK::version();
        if ( $this->MinVersion !== false )
        {
            if ( $this->MaxVersion !== false )
            {
                if ( version_compare( $this->MinVersion, $ezversion , 'le' ) &&
                     version_compare( $this->MaxVersion, $ezversion , 'ge' ) )
                {
                    return true;
                }
                return false;
            }
            if ( version_compare( $this->MinVersion, $ezversion , 'le' ) )
            {
                return true;
            }
            return false;
        }
        else
        {
            if ( version_compare( $this->MaxVersion, $ezversion , 'ge' ) )
            {
                return true;
            }
            return false;
        }
    }
117599
function calculateVersion(officialRelease, callback) {
    var version = require('./package.json').version;

    if (officialRelease) {
        callback(version);
    } else {
        git.short(function (str) {
            callback(version + '+' + str);
        });
    }
}
1101124
function updateManifests() {
      function updateVersion( name ) {
        var _ = grunt.util._;
        var manifest = grunt.file.readJSON(name);

        manifest = JSON.stringify(_.extend(manifest, {version: grunt.option('version')}), null, 2);
        grunt.file.write(name, manifest);
      }
      return Q.fcall(function() {
        var files = [
          path.join('./', 'package.json'),
          path.join('./', 'bower.json')
        ];
        files.forEach(function(item){
          //grunt.log.ok(item);
          if ( existsFilePath(item) ) {
            updateVersion(item);
          }
        });
      });
    }
598038
function sealVersion(machineName, versionKey) {
        return co(function*(){
            debug("Attempting to seal the version '%s' of the machine '%s'", versionKey, machineName);
            let info = yield getVersionInfo(machineName, versionKey);
            if(info.isSealed) {
                throw new Error("Version it already sealed");
            }

            debug("Getting manifest");
            let manifest = getManifest();
            let model = getVersionSCXML(machineName, versionKey);
            let isValid = isSCXMLValid(model);

            if(!isValid) {
                throw new Error("The model is not valid.");
            }

            info.isSealed = true;
            setVersionInfo(machineName, versionKey, info);
            debug("The version '%s' of the machine '%s' was sealed successfully", versionKey, machineName);

        });
    }
1233813
def check_version(mod, required):
    """"""
    vers = tuple(int(v) for v in mod.__version__.split('.')[:3])
    if vers < required:
        req = '.'.join(str(v) for v in required)
        raise ImproperlyConfigured(
            "Module \"%s\" version (%s) must be >= %s." %
            (mod.__name__, mod.__version__, req))
1210774
def _check_version(self, request):
        """"""
        version = self._get_version(request)
        if version and version != self.version:
            raise Error('OAuth version %s not supported.' % str(version))
264767
def update(self, version, reason=None):
        
        _check_version_format(version)
        return self.collection.update({'_id': 'manifest'}, {
            '$set': {'version': version},
            '$push': {'history': {
                'timestamp': datetime.utcnow(), 'version': version,
                'reason': reason}}
        })
1074799
def _update_manifest(manifest_file, name, version):
    
    if os.path.exists(manifest_file):
        with open(manifest_file) as in_handle:
            manifest = yaml.safe_load(in_handle)
    else:
        manifest = {}
    manifest[name] = {"name": name, "version": version}
    with open(manifest_file, "w") as out_handle:
        yaml.safe_dump(manifest, out_handle, default_flow_style=False, allow_unicode=False)
1266731
public static void showVersion(BootstrapConfig bootProps) {
        BootstrapManifest bootManifest;
        try {
            bootManifest = BootstrapManifest.readBootstrapManifest(Boolean.parseBoolean(bootProps.get(BootstrapConstants.LIBERTY_BOOT_PROPERTY)));
            String kernelVersion = bootManifest.getBundleVersion();
            String productInfo = getProductInfoDisplayName();

            processVersion(bootProps, "info.serverVersion", kernelVersion, productInfo, true);
        } catch (IOException e) {
            throw new LaunchException("Could not read the jar manifest", BootstrapConstants.messages.getString("error.unknown.kernel.version"), e);
        }
    }
680358
def _check_version():
    """"""
    from ._config import APP_NAME

    if VersionCache.load(APP_NAME).is_fresh:
        return

    from pkg_resources import parse_version
    from renku.version import __version__

    version = parse_version(__version__)
    allow_prereleases = version.is_prerelease

    latest_version = find_latest_version(
        'renku', allow_prereleases=allow_prereleases
    )

    if version < latest_version:
        click.secho(
            'You are using renku version {version}, however version '
            '{latest_version} is available.\n'
            'You should consider upgrading ...'.format(
                version=__version__,
                latest_version=latest_version,
            ),
            fg='yellow',
            bold=True,
        )

    VersionCache(pypi_version=str(latest_version)).dump(APP_NAME)
751601
function validVersion(version, spec) {
  // Normalize route versions
  var test = spec.versions || [spec.version]

  // Check for direct version match
  if (~test.indexOf(version)) {
    return true
  }

  // Use semver and attempt to match on supplied version
  return !!test.filter(function(v) {
    return semver.satisfies(v, version)
  }).length
}
813638
public boolean validateVersionType(String versionType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}
117528
function determineVersion(module) {
		var json;

		if (!('version' in module)) {
			json = module.options.path + '/package.json';
			delete require.cache[json];
			json = require(json);

			['dependencies', 'devDependencies', 'optionalDependencies'].forEach(function(dep) {
				if (dep in json && module.name in json[dep]) {
					module.version = json[dep][module.name];
				}
			});
		}
	}
478970
def find_version():
    """"""
    version_file = read_file('__init__.py')
    version_match = re.search(r'^__version__ = ["\']([^"\']*)["\']',
                              version_file, re.M)
    if version_match:
        return version_match.group(1)
    raise RuntimeError('Unable to find version string.')
692301
def detect_version_str(self):
        
        help_text = run_matlab_cmd("help('{}')".format(self.test_func))
        if not help_text:
            raise ArcanaRequirementNotFoundError(
                "Did not find test function '{}' for {}"
                .format(self.test_func, self))
        return self.parse_help_text(help_text)