James Gray
5/4/2005 10:52:00 PM
On May 4, 2005, at 5:34 PM, Vincent Foley wrote:
> Hello,
>
> I have a question for people who use both Rake and Subversion: is
> there
> a way to make an Rake::RDocTask not delete the whole documentation
> folder? Because right now, when I call rake with my rdoc task, it
> nukes the folder, including the .svn/ directory in it. Right now I
> generate documentation in another directory, but I would really
> like to
> know if there's a way to make Rake and Subversion play nice.
Well, the general thinking here is that RDoc documentation should not
be version controlled. It can be recreated from the source at any
time, so storing it just provides the window for it to get out of
sync with the current state of the code.
If that makes sense to you, just propset svn:ignore for the rdoc
directory.
> And while we're talking about Subversion, is there a way when comes
> the
> time to package my app to select everything but the .svn folders?
When you pass the file list to your Rake packaging task, use
something like:
Dir.glob("{examples,lib,test}/**/*.rb").delete_if { |item|
item.include?(".svn") }
The delete_if() isn't even needed in this instance, because .svn
won't end in .rb. I just put it in there to give you ideas. Now
that I think about it, I'm not even sure if Dir.glob() returns things
that begin with a . character.
Anyway, hope some of that babble gives you a leaping off point. :D
James Edward Gray II