nothingmuch at woobling.org
Wed Jul 30 07:58:26 BST 2008
svn log -q --limit 1 http://code2.0beta.co.uk/moose/svn/ | perl -ne
'print $1 if /r(\d+)/'
On Tue, Jul 29, 2008 at 22:56:09 +0100, Simon Wistow wrote:
> I have a Makefile that produces a package. All well and good. And as a
> good developer I want that package to have a major and minor version
> number. Also well and good.
> Now the major version i can set for myself and I can work out the minor
> number using
> # Version is set manually
> VERSION = 2.0
> # Work out the revision from the SVN revision
> # This will be automatically updated when we commit
> REVISION = `echo '$Revision$\' | cut -d ' ' -f 2`
> So that's fine. Except I don't want to have to touch then commit the
> Makefile everytime.
> Now I'd like people who do a svn export as well as an svn co to be able
> to do this so that rules out grubbing through .svn directories. I'd also
> rather not have a $Revision$ in every file and then recursively grep
> through all of them looking for the highest number.
> Is there anyway to force a file to always be updated on every commit?
Yuval Kogman <nothingmuch at woobling.org>
More information about the london.pm