<div dir="ltr">Hi!<div><br></div><div>I try to prepare erlang release, with follow config:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">{relx, [<br>    {release, {x, "0.0.1"},<br>         [x,<br>          sasl]},<br>    {overlay, [<br>         {copy, "priv/*", "priv/"}<br>    ...<br>./rebar3 release</blockquote><div><br></div><div>But, relx doesn't support wildcard. I'm try the follow config:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">    ...<br>         {copy, "priv/", "priv/"}<br>    ...<br>./rebar3 release</blockquote><div><br></div><div>Unfortunately, the result will be <i>priv/priv</i>. But when I do:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">    ...<br>         {copy, "priv/", "./"}<br>    ...<br>./rebar3 release</blockquote></div><div><br></div><div>Everything goes without problems. But, when I'm try to make tarball from that here problems come: the <i>./rebar3 tar</i> goes to endless loop continuously add <u><i>x-0.0.1.tar.gz</i></u> to himself. </div><div><br></div><div>The <i>./rebar3 tar</i> keep archive tar.gz file in the same directory with generated erlang release files. So, when rebar3 sees mappings like {copy, "priv/", "./"} it's transforms them into something like</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">[{"./",           "/Users/juise/Documents/x/_build/default/rel/x"},<br> {"log/sasl", "/Users/juise/Documents/x/_build/default/rel/x/log/sasl"}]</blockquote><div><br></div><div>which cause endless loop.</div><div><br></div><div>I see multiple solutions:</div><div>- ./rebar3 tar must archive all files in release directory, and not pay attention to overlay directive;</div><div>- relx should ignore mappings like {"./", "/Users/juise/Documents/x/_build/default/rel/x"};</div><div>- erl_tar should explicitly ignore result archive and don't add to himself.</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Петровский Александр / Alexander Petrovsky,<br><br>Skype: askjuise<br><div>Phone: +7 931 9877991<div><br></div></div></div></div></div></div>
</div></div>