tomegantech / git-meta-data-phing-tasks
A small collection of tasks for obtaining meta-data for a git repo as properties in your phing build file.
Installs: 4 919
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 2
Requires
- php: >=8.0
- phing/phing: ^3.0@RC
README
A small collection of Phing tasks for obtaining meta data for a git repo as properties in your build file.
Installation
These tasks can be installed with Composer.
composer require "tomegantech/git-meta-data-phing-tasks"
Usage
The tasks can the be used in your build.xml
:
<taskdef name="git-branch-name" classname="TomEganTech\GitMetaDataPhingTasks\GitBranchNameTask" /> <git-branch-name property="build.branchName" />
<taskdef name="git-commit-id" classname="TomEganTech\GitMetaDataPhingTasks\GitCommitIdTask" /> <git-commit-id property="build.commitId" />
Dependencies
- Phing 3.0+
Note you do not need a git executable as this library reads the git metadata from the filesystem. Though typically a risky design choice as changes to git internals would break these tasks, the files involved have not changed for multiple major versions and not having a functioning git executable was a design constraint of the work which prompted the creation of this library.