https://github.com/yev/yiigitbuildnumber
The component for Yii framework to retrieve the build information (last commit id and commit time)
https://github.com/yev/yiigitbuildnumber
Last synced: 19 days ago
JSON representation
The component for Yii framework to retrieve the build information (last commit id and commit time)
- Host: GitHub
- URL: https://github.com/yev/yiigitbuildnumber
- Owner: yev
- Created: 2013-01-25T13:24:34.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-03-12T16:24:27.000Z (over 13 years ago)
- Last Synced: 2025-01-05T02:42:12.727Z (over 1 year ago)
- Language: PHP
- Size: 250 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
yiiGitBuildNumber
=================
The component for Yii framework to retrieve the build information (last commit id and commit time).
This is a very simple component that uses internally the git cmd functions.
The idea of writing this component comes from my Java experience with very popular plugin [maven-build-number](http://mojo.codehaus.org/buildnumber-maven-plugin/ "Maven-Build-Number-Plugin").
So after making some [improvements](http://yevgen-fr.blogspot.com/2012/02/my-first-open-source-commitment-git.html)
for existing maven plugin I decided to make something similar for the PHP/Yii world.
I think that the little usefull and effortless tricks like this one, can make you application more proffessional.
The screenshot below demonstrates what does this component:

Installation instructions
-------------------
Copy the *GitBuildNumberComponent.php* file to your webapp */protected/components/* folder.
`wget https://github.com/yev/yiiGitBuildNumber/blob/master/src/GitBuildNumberComponent.php`
Configuration instruction
-------------------
After downloading and installing the component into right place you have to tell yii framework about tne new component:
1. Edit your webapp/protected/config/main.php file
2. And add the following somewhere in the *components* section - `'git'=>array(
'class'=>'GitBuildNumberComponent',
)`
3. After this modification your `protected/config/main.php` file may looks like this:

Using
-------------------

Requirements
-------------------
The component has been tested on Yii 1.1.12 and PHP 5.4.