phing: get last commit ID (revision) and use it as a phing attribute
-
05-10-2019 - |
문제
I'm trying to get the latest revision ID from my SVN project using Phing. What I'm trying to do is the following:
- get latest revision/commit number from svn
- store this revision number as an
attribute (so that I can use this
to append it to the archive I'm
already creating using phing)
I don't have a working copy on my server where phing is running, so I cannot use the Phing SvnLastRevisionTask.
해결책 2
we found it ourselves and did it as follows:
<exec command="svn info http://user:pass@localhost/repos/trunk | grep Revision | awk '{print $2}'" outputProperty="svn.lastrevision" />
enjoy!
다른 팁
There's a built-in way to get the latest revision as well
<svnlastrevision
svnpath="${svn.path}"
workingcopy="${outputdir}"
propertyname="svn.lastrevision"/>
제휴하지 않습니다 StackOverflow