Retrieves the platforms and their versions from the platforms.json file Returns an array of {platform: platform, version: version} ... ... where version could be '3.4.0', '/path/to/platform' or 'git://...'
761684
function getVersions(projectRoot) {
    var platformsDir = path.join(projectRoot, 'platforms');
    var platformsJsonFile = path.join(platformsDir, 'platforms.json');

    // If the platforms.json file doesn't exist, retrieve versions from platforms installed on the filesystem...
    // ...Note that in this case, we won't be able to know what source(folder, git-url) the platform came from, we'll just use versions
    return getPlatVersionsFromFile(platformsJsonFile).fail(function(){
        return getPlatVersionsFromFileSystem(projectRoot);
    });
}
616593
def fetch_prerelease_versions
      Utils.logger.info(
        "Fetching #{Configuration.prerelease_versions_file}" \
        " on #{@name} (#{@host})"
      )
      Http.get(host + '/' + Configuration.prerelease_versions_file).body
    end
523587
function getPlatformVersion (platformRoot) {
    var versionFile = path.join(platformRoot, 'cordova/version');

    if (!fs.existsSync(versionFile)) {
        return null;
    }

    var version = shell.cat(versionFile).match(/VERSION\s=\s["'](.*)["'];/m);
    return version && version[1];
}
940770
def version_info(self):
        

        # Retrive and show local version info
        package = pkg.get_distribution('git-up')
        local_version_str = package.version
        local_version = package.parsed_version

        print('GitUp version is: ' + colored('v' + local_version_str, 'green'))

        if not self.settings['updates.check']:
            return

        # Check for updates
        print('Checking for updates...', end='')

        try:
            # Get version information from the PyPI JSON API
            reader = codecs.getreader('utf-8')
            details = json.load(reader(urlopen(PYPI_URL)))
            online_version = details['info']['version']
        except (HTTPError, URLError, ValueError):
            recent = True  # To not disturb the user with HTTP/parsing errors
        else:
            recent = local_version >= pkg.parse_version(online_version)

        if not recent:
            # noinspection PyUnboundLocalVariable
            print(
                '\rRecent version is: '
                + colored('v' + online_version, color='yellow', attrs=['bold'])
            )
            print('Run \'pip install -U git-up\' to get the update.')
        else:
            # Clear the update line
            sys.stdout.write('\r' + ' ' * 80 + '\n')
37597
function getVersionTags() {
	var tags = exec('git tag', { silent: true }).output.trim().split(/\n/g);

	return tags.reduce(function(list, tag) {
		if (semver.valid(tag)) {
			list.push(tag);
		}
		return list;
	}, []).sort(semver.compare);
}
585290
def get_versions() -> FileVersionResult:
    

    version_counter = Counter()
    versions_match = False
    version_str = None
    versions_discovered = OrderedDict()

    for version_obj in version_objects:
        discovered = version_obj.get_version()
        versions_discovered[version_obj.key_name] = discovered
        version_counter.update([discovered])

    if len(version_counter) == 1:
        versions_match = True
        version_str = list(version_counter.keys())[0]

    return FileVersionResult(
        uniform=versions_match,
        version_details=versions_discovered,
        version_result=version_str,
    )
82628
def versions(self) -> List(BlenderVersion):
        

        return [BlenderVersion(tag) for tag in self.git_repo.tags] + [BlenderVersion(BLENDER_VERSION_MASTER)]
614063
def get_version
      response = get_json_response(build_request_url('getVersion'))
      response.trim(:getVersionResponse)
      if response.response.has_key?('version')
        response.results = response.response['version']
      end
      return response
    end
1372623
def _version_view(self):
        
        version_json = self._version_callback(self.version_path)
        if version_json is None:
            return 'version.json not found', 404
        else:
            return jsonify(version_json)
550591
def get_git_version(cls):
        
        try:
            output = cls.run_git_shell('git version')
        except CalledProcessError:
            cls.LOG.warning("Unable to get Git version.")
            return None

        try:
            version = output.split()[2]
        except IndexError:
            cls.LOG.warning("Unable to parse Git version \"%s\".", output)
            return None

        try:
            return tuple(int(v) for v in version.split('.'))
        except ValueError:
            cls.LOG.warning("Unable to parse Git version \"%s\".", version)
            return None
317225
public function requestVersion(): array
    {
        try {
            $versions = json_decode(file_get_contents($this->apiURL), true)['packages']['orchid/platform'];

            return array_reverse($versions);
        } catch (\Exception $exception) {
            Log::alert($exception->getMessage());

            return [['version' => '0.0.0']];
        }
    }
198465
def get_versions(self):
        

        if not self.object_id:
            return []
        url = self.build_url(
            self._endpoints.get('versions').format(id=self.object_id))

        response = self.con.get(url)
        if not response:
            return []

        data = response.json()

        # Everything received from cloud must be passed as self._cloud_data_key
        return [DriveItemVersion(parent=self, **{self._cloud_data_key: item})
                for item in data.get('value', [])]
573587
def [](version)
      return versions.values.last unless version
      detected = versions.detect { |v,_| version.start_with?(v) }
      raise ArgumentError, 'unsupported version %p' % version unless detected
      detected.last
    end
350539
function listWithoutVersions() {
  const options = {
    transforms() {
      return [filter({wantStrings: true}, function (str) {
        return str.indexOf('@') === -1;
      })];
    }
  };

  return list(options);
}
604943
def get_versions():
    """"""
    # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have
    # __file__, we can work backwards from there to the root. Some
    # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which
    # case we can only use expanded keywords.

    cfg = get_config()
    verbose = cfg.verbose

    try:
        return git_versions_from_keywords(get_keywords(), cfg.tag_prefix,
                                          verbose)
    except NotThisMethod:
        pass

    root = os.path.realpath(__file__)

    root_dir = os.path.dirname(root)
    if os.path.isfile(os.path.join(root_dir, 'VERSION')):
        with open(os.path.join(root_dir, 'VERSION')) as vfile:
            version = vfile.readline().strip()

        return {
            "version": version,
            "full-revisionid": None,
            "dirty": None,
            "error": None,
            "date": None
        }

    try:
        # versionfile_source is the relative path from the top of the source
        # tree (where the .git directory might live) to this file. Invert
        # this to find the root from __file__.
        for i in cfg.versionfile_source.split('/'):
            root = os.path.dirname(root)
    except NameError:
        return {"version": "0+unknown", "full-revisionid": None,
                "dirty": None,
                "error": "unable to find root of source tree",
                "date": None}

    try:
        pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose)
        return render(pieces, cfg.style)
    except NotThisMethod:
        pass

    try:
        if cfg.parentdir_prefix:
            return versions_from_parentdir(cfg.parentdir_prefix, root, verbose)
    except NotThisMethod:
        pass

    return {"version": "0+unknown", "full-revisionid": None,
            "dirty": None,
            "error": "unable to compute version", "date": None}
338101
def _populate_ips_versions(self):
        
        # Get a map of version ID's from our most recent IPS version
        ips = IpsManager(self.ctx)
        ips = ips.dev_version or ips.latest
        with ZipFile(ips.filepath) as zip:
            namelist = zip.namelist()

            ips_versions_path = os.path.join(namelist[0], 'applications/core/data/versions.json')
            if ips_versions_path not in namelist:
                raise BadZipfile('Missing versions.json file')
            self.ips_versions = json.loads(zip.read(ips_versions_path), object_pairs_hook=OrderedDict)
            self.log.debug("%d version ID's loaded from latest IPS release", len(self.ips_versions))
750326
def get_version(root):
    
    version_json = os.path.join(root, 'version.json')
    if os.path.exists(version_json):
        with open(version_json, 'r') as version_json_file:
            return json.load(version_json_file)
    return None