limenet/git-version

PHP library to generate a version string based on a Git repository.

v0.1.6 2018-11-01 09:47 UTC

This package is auto-updated.

Last update: 2020-06-27 13:21:52 UTC


README

Build Status Latest Stable Version License Total Downloads StyleCI codecov

Usage

Standalone

<?php

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());

Laravel

$version = GitVersion::get();