I'm just finishing up an addition to the build script that executes  
"svnversion" and stores the result in a "versioninfo" file that would  
be placed in the clojure.jar file and the value stored in a *version*  
var in boot.clj.

If someone is building from source, I think we can assume they have  
development tools.

-Matt

On Nov 7, 2008, at 2:20 PM, Graham Fawcett wrote:

>
> On Fri, Nov 7, 2008 at 1:48 PM, Chouser <[EMAIL PROTECTED]> wrote:
>>
>> On Fri, Nov 7, 2008 at 1:02 PM, Graham Fawcett <[EMAIL PROTECTED] 
>> > wrote:
>>>
>>> If Rich would be willing to add this to boot.clj,
>> [snip]
>>>
>>> ...then (clojure-svn-revision) ought to return the revision number  
>>> as
>>> a string.
>>
>> I'd really like to see something like this too, but unfortunately I
>> don't think it's this simple.
>>
>> Please correct me if I'm wrong, but any changes to the Clojure  
>> sources
>> that don't include a change to boot.clj will fail to update this
>> revision number.  If that's the case, the number reported could be
>> misleading, and I'd argue would be worse than no number at all.
>
> Oh, excellent point.
>
>> I think the "right" way to do this would be for the Clojure compile
>> process to include a call out to "svn info" to get the revision  
>> number
>> of the whole tree, and then somehow include the results of that back
>> in the .jar file for some Clojure function to read. ...but I don't
>> really know enough about ant (or svn either, for that matter) to do
>> this myself.
>
> I suspect there is a better way than that -- we shouldn't really
> depend upon the client to have 'svn' installed at build-time, though
> it would often be the case.
>
> Subversion supports 'hook scripts' that are run server-side during a
> commit process. I'm sure someone else has written such a script to
> update a version-file (e.g. version.clj, containing a *version* def)
> that is touched any time a revision is made.
>
> Let me see what I can find.
>
> Graham
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to