protected function getVersion()
    {
        // Get version from tag
        $cmd = new Command('git');
        $cmd = $cmd->arg('tag')
            ->execute();
        $output = explode(PHP_EOL, trim($cmd->getOutput()));
        $currentVersion = '0.0.0';
        foreach ($output as $tag) {
            if (preg_match(SemanticVersion::REGEX, $tag)) {
                if (version_compare($currentVersion, $tag, '<')) {
                    $currentVersion = $tag;
                }
            }
        }
        return new SemanticVersion($currentVersion);
    }
protected function getVersion()
    {
        // Get version from tag
        $cmd = new Command('git');
        $cmd = $cmd->arg('tag')
            ->execute();
        $output = explode(PHP_EOL, trim($cmd->getOutput()));
        $currentVersion = '0.0.0';
        foreach ($output as $tag) {
            if (preg_match(SemanticVersion::REGEX, $tag)) {
                if (version_compare($currentVersion, $tag, '<')) {
                    $currentVersion = $tag;
                }
            }
        }
        return new SemanticVersion($currentVersion);
    }
protected function getVersion ( ) { // Get version from tag $ cmd = new Command ( 'git' ) ; $ cmd = $ cmd -> arg ( 'tag' ) -> execute ( ) ; $ output = explode ( PHP_EOL , trim ( $ cmd -> getOutput ( ) ) ) ; $ currentVersion = '0.0.0' ; foreach ( $ output as $ tag ) { if ( preg_match ( SemanticVersion :: REGEX , $ tag ) ) { if ( version_compare ( $ currentVersion , $ tag , '<' ) ) { $ currentVersion = $ tag ; } } } return new SemanticVersion ( $ currentVersion ) ; }
Return current version

@return SemanticVersion
Return current version