Liip\RMT\Version\Persister\VcsTagPersister::getCurrentVersion PHP Method

getCurrentVersion() public method

public getCurrentVersion ( )
    public function getCurrentVersion()
    {
        $tags = $this->getValidVersionTags($this->versionRegex);
        if (count($tags) === 0) {
            throw new \Liip\RMT\Exception\NoReleaseFoundException('No VCS tag matching the regex [' . $this->getTagPrefix() . $this->versionRegex . ']');
        }
        // Extract versions from tags and sort them
        $versions = $this->getVersionFromTags($tags);
        usort($versions, array(Context::get('version-generator'), 'compareTwoVersions'));
        return array_pop($versions);
    }