PHP code example of limenet / git-version
1. Go to this page and download the library: Download limenet/git-version library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
limenet / git-version example snippets
use limenet\GitVersion\Directory;
use limenet\GitVersion\File;
use limenet\GitVersion\Formatters\SemverFormatter;
$directory = new Directory($baseDir);
$version = $directory->get(new SemverFormatter());
$file = new File($baseDir);
$version = $file->get(new SemverFormatter());
$version = GitVersion::get();