buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <alex.boisv...@gmail.com>
Subject Re: installing non-archive artifacts
Date Thu, 19 Nov 2009 17:21:05 GMT
On Thu, Nov 19, 2009 at 8:34 AM, Greg Lucas <greg.lucas@gmail.com> wrote:

> Just in case anyone else is looking to do the same (produce an XML artifact
> as build output):
>
> I ended up defining a new package type for this after all. The
> artifact.from approach works (thanks for the fix!) but behaves a bit
> differently than I'd like - for example the file gets generated when you do
> 'buildr artifacts'.
>
> So now I'm doing it this way:
>
> def package_as_file(file_name)
>  file file_name  => [...] do
>    ... #generate the file
>  end
> end
> def package_as_file_spec(spec)
>  spec.merge({ :type=>:xml })
> end
>
> package(:file)
>
> In my case generating the file means copying a template file and replacing
> various tokens. I wonder if there should be a built-in package type for
> files to simplify this a bit, so you could specify a src file and define a
> block to produce the target file?
>

Yes, I think a built-in support is warranted.   Do you want to provide a
patch?  Otherwise, I can take care of it.

alex

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message