limenet / git-version
PHP library to generate a version string based on a Git repository.
Installs: 7 760
Dependents: 1
Suggesters: 1
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- league/uri: ^5.0
- spatie/regex: ^1.1
Requires (Dev)
- php: ^7.1
- composer/semver: ^1.4
- illuminate/support: 5.5.* || 5.6.* || 5.7.*
- moontoast/math: ^1.1
- orchestra/testbench: ^3.5
- phpunit/phpunit: ^6.1 || ^7.0
- ramsey/uuid: ^3.6
README
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();