Get repository version.

@return string
Version.
9683
public function getVersion()
    {
        $process = new Process('git describe --tags HEAD', $this->directory);

        if ($process->run() == 0) {
            $version = trim($process->getOutput());
        } else {
            $process = new Process('git log --pretty="%H" -n1 HEAD', $this->directory);

            if ($process->run() != 0) {
                throw new \RuntimeException('Can\'t run git log. You must ensure that git binary is available.');
            }

            $version = 'rev-' . substr(trim($process->getOutput()), 0, 8);
        }

        return $version;
    }
223198
public function getVersion()
    {
        if ($this->_version) {
            return $this->_version;
        }

        $data = $this->request('/')->getData();

        return $this->_version = $data['version']['number'];
    }
619677
public function getVersionString() {
        if ($this->versionString === null) {
            if (!$this->isConnected())
                $this->connect();
            $this->versionString = pg_version($this->hConnection)['server'];
        }
        return $this->versionString;
    }
680091
public function getVersionString() {
        if ($this->versionString === null) {
            if (!$this->isConnected())
                $this->connect();
            $this->versionString = mysql_get_server_info($this->hConnection);
        }
        return $this->versionString;
    }
878552
public static function getVersion() {
		if (empty(self::$version)) {
			$filename = Application::get(['application', 'path_full']) . (Application::isDeployed() ? '../../../deployed' : '../../deployed');
			self::$version = filemtime($filename);
		}
		return self::$version;
	}
853643
public function version()
	{
		if (isset($this->data_cache['version']))
		{
			return $this->data_cache['version'];
		}

		$version = SQLite3::version();
		return $this->data_cache['version'] = $version['versionString'];
	}
262710
public function version()
    {
        if (parent::version() !== null) {
            return parent::version();
        }

        $this->_version = '';
        $lib = strtolower($this->_packageName);

        if ($lib === 'lib-icu') {
            $lib = 'intl';
        } elseif (stripos($lib, 'ext-') === 0) {
            $lib = substr($lib, 4);
        }

        if ($lib === 'php') {
            $this->_version = PHP_VERSION;
        } elseif (function_exists('phpversion')) {
            $version = phpversion($lib);
            $this->_version = $version === false ? '' : $version;
        } elseif (function_exists('extension_loaded')) {
            $this->_version = extension_loaded($lib) ? '99999' : '';
        }

        return $this->_version;
    }
644519
protected function getVersion()
    {
        $version = $this->option('use-version') ?: $this->version;

        if (! $version) {
            $this->comment('A version for the documentation was not supplied. Use the --use-version option or set a default in the configuration.');

            exit;
        }

        return $version;
    }
718104
public function getVersion()
    {
        $modules = $this->getModules();
        $lockModules = $this->getModuleVersionFromComposer(array_keys($modules));
        $output = [];
        foreach ($modules as $module => $title) {
            $version = isset($lockModules[$module])
                ? $lockModules[$module]
                : _t(__CLASS__ . '.VERSIONUNKNOWN', 'Unknown');
            $output[] = $title . ': ' . $version;
        }
        return implode(', ', $output);
    }
645925
public function getVersionsBehind()
    {
        $current = $this->getCurrentVersion();
        $versions = array_filter($this->getVersions(),
                function ($version) use ($current) {
                    return $version > $current;
                }
        );

        return count($versions);
    }
96967
public function version()
    {
        if ( $this->versionObject === null )
            $this->versionObject = eZContentObjectVersion::fetch( $this->attribute( 'ezcontentobject_version_id' ) );

        return $this->versionObject;
    }
1026089
public function getUpdates()
    {
        if (!$this->loadRepositories()) {
            return Repository::STATUS_NO_REPOSITORIES;
        }

        $modules = $this->getModulesFromRepository();

        // Is a higher version of an already installed package available?
        foreach ($modules as $key => $module) {
            $version = $this->packageService->getVersion($module->name);

            if (!$version) {
                // Not installed at all.
                unset($modules[$key]);
            } elseif (version_compare($version, $module->version, '<')) {
                // Older version installed.
                $modules[$key]->versionInstalled = $version;
            } else {
                unset($modules[$key]);
            }
        }

        return $modules;
    }
547689
public function getVersionsToSync()
    {
        $versionsToSync      = [ ];
        $remote              = $this->client($this->setting('connection'));
        $currentVersions     = $this->project->getRefs();
        $allowedVersionRange = new expression($this->setting('sync.constraints.versions'));
        $tags                = $remote->getTags($this->setting('repository'), $this->setting('owner'));
        $skipPatch           = $this->setting('sync.constraints.skip_patch_versions', false);
        $skipMinor           = $this->setting('sync.constraints.skip_minor_versions', false);
        $skipPatch           = $skipMinor === true ? true : $skipPatch; // if we skip minors, we automaticly skip patches as well

        $this->fire('versions.start', [ $tags ]);

        foreach ( $tags as $tag => $sha )
        {
            try
            {
                $version = new version($tag);
            }
            catch (SemVerException $e)
            {
                continue;
            }

            // Check all version constraints
            if ( $version->satisfies($allowedVersionRange) === false || in_array($version->getVersion(), $currentVersions, true) )
            {
                continue;
            }
            if ( $skipPatch === true && $version->getPatch() !== 0 )
            {
                continue;
            }
            if ( $skipMinor === true && $version->getMinor() !== 0 )
            {
                continue;
            }

            // This version is inside constraints, add it
            $versionsToSync[] = $version;
        }

        $this->fire('versions.finish', [ $versionsToSync ]);
        return $versionsToSync;
    }
1204062
public function getVersions()
    {
        if (!$this->isPropertyAvailable('Versions')) {
            $this->setProperty("Versions", new FileVersionCollection($this->getContext(), $this->getResourcePath(), "Versions"));
        }
        return $this->getProperty("Versions");
    }
765303
public function getVersion() : ?string 
    {
        if ( ! $this->hasVersion()) {
            $this->setVersion($this->getDefaultVersion());
        }
        return $this->version;
    }
687227
private function getVersion()
    {
        $select = new QueryBuilder();
        $versionRow = $select
            ->query("SELECT value FROM {$this->table} WHERE param = 'migration_version'")
            ->fetchRow();

        if (!isset($versionRow['value'])) die("Error: Please init the Crater Migration");
        return $versionRow['value'];
    }
1105792
public static function GetVersionObject() {
		if(!is_object(self::$version)) {
			self::$version = new Version(dirname(__FILE__) .'/../VERSION');
		}
		return(self::$version);
	}