consolidation / version-tool
Template project for PHP libraries.
Requires
- php: >=7.1
Requires (Dev)
- consolidation/robo: ^1.3|^2
- g1a/composer-test-scenarios: ^2
- knplabs/github-api: ^2.7
- php-http/guzzle6-adapter: ^1.1
- phpunit/phpunit: ^6
- satooshi/php-coveralls: ^2
- squizlabs/php_codesniffer: ^2.8
This package is auto-updated.
Last update: 2024-10-29 05:34:20 UTC
README
The version-tool identifies the type and version of several popular projects.
Getting Started
Download the latest version-tool.phar
from the releases page. Run chmod +x version-tool.phar
, rename to version-tool
, and move to some directory in your $PATH (e.g. /usr/local/bin).
version-tool will tell you what program and what version exists in the current working directory:
$ version-tool info
program: Drupal
version: 8.6.1
Detected frameworks:
- Drupal 8
- Drupal 7
- Drupal 6
- WordPress
Using the API
The Version Tool may also be included in another project as a library.
$ composer require consolidation/version-tool
Then, call as follows:
$version_info = new VersionTool();
$info = $version_info->info($path);
$app = $info->application();
$version = $info->version();
Running the tests
The test suite may be run locally by way of some simple composer scripts:
Deployment
- Edit the
VERSION
file to contain the version to release followed by "-dev", and commit the change. - Run
composer release
Contributing
Please read CONTRIBUTING.md for details on the process for submitting pull requests to us.
Versioning
We use SemVer for versioning. For the versions available, see the releases page.
Authors
- Greg Anderson - created project from template.
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE file for details