开发者

add global revision number in php source files

开发者 https://www.devze.com 2023-01-10 06:10 出处:网络
I want to replace a global revision no (head) in my PHP source files whenever I make a checkin (or update)

I want to replace a global revision no (head) in my PHP source files whenever I make a checkin (or update)

for example I have below code

<?php 

print 'Rv no : $glbRevisionNumber$';

?>

in al开发者_StackOverflow中文版l the php files that have under one folder eg. myapp/* the $glbRevisionNumber$ should get replaced with the current head revision number.

How can I achieve this ?


Have a look at svn pre-commit-hooks:

http://wordaligned.org/articles/a-subversion-pre-commit-hook

Here are some example scripts:

http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/


Create a pre-commit hook in your version control system that does a replace of $glbRevisionNumber$ in every committed file.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号