https://github.com/setbased/phing-extensions
A collection of Phing extensions.
https://github.com/setbased/phing-extensions
Last synced: about 1 year ago
JSON representation
A collection of Phing extensions.
- Host: GitHub
- URL: https://github.com/setbased/phing-extensions
- Owner: SetBased
- License: mit
- Created: 2014-12-28T15:46:37.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-09-22T08:42:37.000Z (almost 2 years ago)
- Last Synced: 2025-03-28T10:21:20.642Z (over 1 year ago)
- Language: PHP
- Size: 82 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Phing Extensions
A set of Phing extensions.
[](https://gitter.im/SetBased/phing-extensions?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[](https://packagist.org/packages/setbased/phing-extensions)
[](https://packagist.org/packages/setbased/phing-extensions)
[](https://scrutinizer-ci.com/g/SetBased/phing-extensions/?branch=master)
# Overview
This collection of Phing extensions provides:
* BumpBuildNumberTask
* LastCommitTimeTask
* ReadSemanticVersionTask
* RemoveEmptyDirectoriesTask
* SetDirectoryMTimeTask
## BumpBuildNumberTask
BumpBuildNumberTask bumps a build number to the next build number. The build number is published under supplied
property for further usage in the Phing build script.
#### Parameters
| Name | Type | Description | Default | Required |
|---------------------|--------|-------------------------------------------------------------------------------------------|---------|----------|
| File | string | Filename for storing the build number. | | No |
| HaltOnError | bool | If true the build fails on errors, otherwise this task generates error events. | True | No |
| BuildNumberProperty | string | The name of the property for publishing the build number. | | No |
#### Example
```XML
```
## LastCommitTimeTask
LastCommitTimeTask sets the modification time of files to the last commit time in Git.
#### Parameters
| Name | Type | Description | Default | Required |
|-------------|--------|----------------------------------------------------------------------------------------|---------|----------|
| Dir | string | The directory were under which the sources are located. Typically the build directory. | | Yes |
| HaltOnError | bool | If true the build fails on errors, otherwise this task generates error events. | True | No |
#### Example
```XML
```
## ReadSemanticVersionTask
ReadSemanticVersionTask asks the user for [Semantic version](http://semver.org/) and validates
the given input is a valid [Semantic version](http://semver.org/). The version and its parts are published
under supplied properties for further usage in the Phing build script.
#### Parameters
| Name | Type | Description | Default | Required |
|--------------------|--------|-------------------------------------------------------------------------------------------|---------|----------|
| File | string | Filename for storing the entered SemanticVersion. | | No |
| HaltOnError | bool | If true the build fails on errors, otherwise this task generates error events. | True | No |
| VersionProperty | string | The name of the property for publishing the version (e.g. 1.2.3-alpha.1). | | No |
| ReleaseProperty | string | The name of the property for publishing the major, minor, and patch version (e.g. 1.2.3). | | No |
| MajorProperty | string | The name of the property for publishing the major version (e.g. 1). | | No |
| MinorProperty | string | The name of the property for publishing the minor version (e.g. 2). | | No |
| PatchProperty | string | The name of the property for publishing the patch version (e.g. 3). | | No |
| PreReleaseProperty | string | The name of the property for publishing the pre-release version (e.g. alpha.1). | | No |
#### Example
```XML
```
## RemoveEmptyDirectoriesTask
RemoveEmptyDirectoriesTask removes recursively empty directories under a parent directory.
#### Parameters
| Name | Type | Description | Default | Required |
|--------------|--------|--------------------------------------------------------------------------------|---------|----------|
| Dir | string | The parent directory under which empty directories must be removed. | | True |
| RemoveParent | bool | If true the parent directory is removed as well if it is empty. | False | No |
| HaltOnError | bool | If true the build fails on errors, otherwise this task generates error events. | True | No |
#### Example
```XML
```
## SetDirectoryMTimeTask
SetDirectoryMTimeTask sets recursively the modification time of directories to the maximum modification time of its
entries.
#### Parameters
| Name | Type | Description | Default | Required |
|-------------|--------|--------------------------------------------------------------------------------|---------|----------|
| Dir | string | The parent directory. | | True |
| HaltOnError | bool | If true the build fails on errors, otherwise this task generates error events. | True | No |
#### Example
```XML
```
# Installation
We recommend to install setbased/phing via [Composer](https://getcomposer.org/):
```json
{
"require-dev": {
"setbased/phing-extensions": "2.*"
}
}
```