append svn revision to port version

Dan Ports dports at macports.org
Fri Dec 9 13:56:39 PST 2011


On Fri, Dec 09, 2011 at 12:42:53PM -0800, Bradley Giesbrecht wrote:
> 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.

Sounds like a good idea to me. I would probably use `svnversion` rather
than `svn info` to get the revision number. In addition to being a
little simpler, it'll also indicate whether the working copy had local
modifications (or mixed revisions or more esoteric things).

Dan

-- 
Dan R. K. Ports              MIT CSAIL                http://drkp.net/


More information about the macports-dev mailing list