diff --git a/.gitattributes b/.gitattributes index 07d5b35..c9028ae 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,7 @@ /.gitattributes export-ignore /.gitlab-ci.yml export-ignore /build export-ignore -/docs +/docs export-ignore /phpcs.xml.dist export-ignore /phpmd.xml.dist export-ignore /phpunit.xml.dist export-ignore diff --git a/README.md b/README.md index af53db2..717da9a 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,15 @@ This package is intended to give a usefull option +## Usage +```php +try { + $retriever = Retriever::getWithFactory(GitHashFinderFactory::withDefaultFinders()); + echo $retriever->getHash($path)->hash() . PHP_EOL; +} catch (GitHashException $exception) { + echo 'Failed to get the hash ' . $exception->getMessage() . PHP_EOL; +} +``` ## Examples See docs/examples for examples about how to use this package. diff --git a/composer.json b/composer.json index dff2df1..3abbbe7 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,8 @@ "description": "Get the current git hash from your project.", "keywords": [ "tjvb", - "githash" + "githash", + "hash" ], "license": "MIT", "authors": [