[erlang-questions] customizing the rebar-generated .app file

Tim Watson watson.timothy@REDACTED
Thu Oct 6 09:06:23 CEST 2011

Oh and while you're at it, you might find
https://github.com/hyperthunk/rebar_dist_plugin useful as well, for bundling
things up once you've generated your releases.

On 6 October 2011 08:02, Tim Watson <watson.timothy@REDACTED> wrote:

> On 5 October 2011 15:29, Joel Reymont <joelr1@REDACTED> wrote:
>> rebar is being too clever here.
>> Suppose you are using git and are in the top level of the project when
>> building, as you should be.
>> rebar will default the version to "git describe --always --tags `git log
>> -n 1 --pretty=format:%h .`".
> So at the moment if you do {vsn, git} that is what rebar will do. As an
> alternative, it would be nice if rebar would allow {vsn, {scm, CmdString}}
> so you can customise this. *BUT*...
> Rebar already has a few ways to customise what's happening. There are
> plugins written in Erlang, which can hook into any command and run either
> before, during or after the command is executed, or can add completely new
> commands. There are also shell hooks that can run before or after any known
> command. I suspect there is a need for the maintainers to keep the number of
> extensibility points/hooks to a minimum in order to remain sane.
> Nevertheless, I've patched rebar to support this syntax here:
> https://github.com/hyperthunk/rebar/tree/custom-vsn-commands - I might
> make a pull request of it but let's see what people think first as it might
> not be the best approach. You would use it like so:
> {application, doodah,
>  [
>   {vsn, {scm, "git rev-parse --short HEAD"}}]}.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111006/6f1f3dd0/attachment.htm>

More information about the erlang-questions mailing list