开发者

Subversion post commit to tags hook

I can have the post commit hook send out an email every time someone checks something, but can I limit that to only if people check something into the tags directory? Basically I want a notification when anyone promotes a release. My subversion is runn开发者_运维技巧ing on Windows. Any ideas?


You get the repo and revision that was committed as the arguments to the post-commit hook.

Use svnlook to get the path of the files changed in the revision and see if it has tags and trigger your email.

 svnlook changed -r $rev $repo

The above will give lines that look like

A   trunk/app/file.cs

Use that info to see if tag was added and write you post-commit


Yes, the first argument to the post-commit script is the repository path; look for <whatever>/tags in there, and only send email if you find it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜