src/package/Support/Git.php
public function version($type)
    {
        $version = $this->extractVersion($this->getVersionFromGit());

        return [
            'major' => $this->getMatchedVersionItem($version, 1),

            'minor' => $this->getMatchedVersionItem($version, 2),

            'patch' => $this->getMatchedVersionItem($version, 3),

            'build' => $this->getMatchedVersionItem($version, 4),
        ][$type];
    }
public function version($type)
    {
        $version = $this->extractVersion($this->getVersionFromGit());

        return [
            'major' => $this->getMatchedVersionItem($version, 1),

            'minor' => $this->getMatchedVersionItem($version, 2),

            'patch' => $this->getMatchedVersionItem($version, 3),

            'build' => $this->getMatchedVersionItem($version, 4),
        ][$type];
    }
public function version ( $ type ) { $ version = $ this -> extractVersion ( $ this -> getVersionFromGit ( ) ) ; return [ 'major' => $ this -> getMatchedVersionItem ( $ version , 1 ) , 'minor' => $ this -> getMatchedVersionItem ( $ version , 2 ) , 'patch' => $ this -> getMatchedVersionItem ( $ version , 3 ) , 'build' => $ this -> getMatchedVersionItem ( $ version , 4 ) , ] [ $ type ] ; }
Get version from the git repository.

@param $type

@throws GitTagNotFound

@return string
Get version from the git repository .