setbased / phing-extensions
A collection of Phing extensions
Installs: 9 469
Dependents: 4
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 1
Requires
- php: >=8.1
- phing/phing: ^3.0.0
- setbased/helper-program-execution: ^1.2.0
README
A set of Phing extensions.
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
Example
<project> <taskdef name="BumpBuildNumberTask" classname="\SetBased\Phing\Task\BumpBuildNumberTask"/> <BumpBuildNumberTask file=".build_number.txt" buildNumberProperty="BUILD_NUMBER" haltOnError="true"/> <echo message="${BUILD_NUMBER}"/> </project>
LastCommitTimeTask
LastCommitTimeTask sets the modification time of files to the last commit time in Git.
Parameters
Example
<project> <taskdef name="LastCommitTimeTask" classname="vendor.setbased.phing-extensions.src.Task.LastCommitTimeTask"/> <LastCommitTimeTask Dir="build"/> </project>
ReadSemanticVersionTask
ReadSemanticVersionTask asks the user for Semantic version and validates the given input is a valid Semantic version. The version and its parts are published under supplied properties for further usage in the Phing build script.
Parameters
Example
<project> <taskdef name="ReadSemanticVersion" classname="vendor.setbased.phing-extensions.src.Task.ReadSemanticVersionTask"/> <ReadSemanticVersion File=".version" VersionProperty="VERSION"/> <echo message="${VERSION}"/> </project>
RemoveEmptyDirectoriesTask
RemoveEmptyDirectoriesTask removes recursively empty directories under a parent directory.
Parameters
Example
<project> <taskdef name="RemoveEmptyDirs" classname="vendor.setbased.phing-extensions.src.Task.RemoveEmptyDirsTask"/> <RemoveEmptyDirectoriesTask Dir="build/www/js" RemoveParent="false"/> </project>
SetDirectoryMTimeTask
SetDirectoryMTimeTask sets recursively the modification time of directories to the maximum modification time of its entries.
Parameters
Example
<project> <taskdef name="SetDirectoryMTimeTask" classname="vendor.setbased.phing-extensions.src.Task.SetDirectoryMTimeTask"/> <SetDirectoryMTimeTask Dir="build"/> </project>
Installation
We recommend to install setbased/phing via Composer:
{ "require-dev": { "setbased/phing-extensions": "2.*" } }