append svn revision to port version

Bradley Giesbrecht pixilla at macports.org
Fri Dec 9 16:30:25 PST 2011


On Dec 9, 2011, at 4:18 PM, Joshua Root wrote:

> On 2011-12-10 07:42 , Bradley Giesbrecht wrote:
>> I use port from trunk and I update trunk regularly. I do not know a how to find what revision of trunk my port command was built from.
>> 
>> Is there any interest in adding the svn revision to the MACPORTS_VERSION when port is built from trunk?
>> 
>> I wrote a shell script "getversion.sh" and call it from configure to add "-$REVISION" when MACPORTS_VERSION  revision/patch-level is 99 and svn info is successful.
>> $ svn diff http://svn.macports.org/repository/macports/trunk/base http://svn.macports.org/repository/macports/users/pixilla/base
> 
> The idea is fine, but you should extend MACPORTS_VERSION_MACRO rather
> than calling a separate shell script.


The MACPORTS_VERSION_MACRO in configure.ac?

I did that first but then the svn version is coded into configure.
Using this method requires autoconf be run on the server after each svn commit or the user run autoconf after each svn up.
It's very possible I am missing something that is obvious to people more familiar with svn and autoconf.


Regards,
Bradley Giesbrecht (pixilla)






More information about the macports-dev mailing list