Hi Rafa,
I know about File.fnmatch, but the problem is I have two folder with
the same name and I want to exclude only one of them, the top one. If
I put
set :copy_exclude, ['config']
it will remove both folders.
Or, in other words, how to match top level folder? Does copy_exclude
support full paths? Can I use %r{^/config} regexp?
On Oct 27, 10:16 am, Rafa García <[email protected]> wrote:
> Hi Hipertracker,
>
> When you set :copy_exclude this pattern is used in the File.fnmatch
> method. It doesn't works as regular expression is more much like shell
> expressión. I'm busy but you can check File.fnmatch
> documentation<http://ruby-doc.org/core-1.9.2/File.html#method-c-fnmatch>[1]
> to see if it'll work well for you.
>
> Regards
>
> [1]http://ruby-doc.org/core-1.9.2/File.html#method-c-fnmatch
>
> 2011/10/27 hipertracker <[email protected]>
>
>
>
>
>
>
>
> > Let's say, I have two folders
>
> > ./config
> > ./application/config
>
> > how to exclude only the first one?
>
> > When I use
>
> > set :copy_exclude, ['config']
>
> > it will exclude all 'config' files/folders from all nested
> > directories. That's not what I wanted.
>
> > Is it possible to exclude only a folder, not a file if they have the
> > same name?
>
> > PS. I know, I can always use run("rm -rf /path/to/what/i/want') after
> > cap deploy, but I am looking for Capistrano built-in options if they
> > exist.
>
> > --
> > * You received this message because you are subscribed to the Google Groups
> > "Capistrano" group.
> > * To post to this group, send email to [email protected]
> > * To unsubscribe from this group, send email to
> > [email protected] For more options, visit this group
> > athttp://groups.google.com/group/capistrano?hl=en
--
* You received this message because you are subscribed to the Google Groups
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/capistrano?hl=en