[erlang-questions] rebar3 tar and endless loop
Alexander Petrovsky
askjuise@REDACTED
Tue Nov 7 23:25:35 CET 2017
Hi!
I try to prepare erlang release, with follow config:
{relx, [
> {release, {x, "0.0.1"},
> [x,
> sasl]},
> {overlay, [
> {copy, "priv/*", "priv/"}
> ...
> ./rebar3 release
But, relx doesn't support wildcard. I'm try the follow config:
...
> {copy, "priv/", "priv/"}
> ...
> ./rebar3 release
Unfortunately, the result will be *priv/priv*. But when I do:
...
> {copy, "priv/", "./"}
> ...
> ./rebar3 release
Everything goes without problems. But, when I'm try to make tarball from
that here problems come: the *./rebar3 tar* goes to endless loop
continuously add *x-0.0.1.tar.gz* to himself.
The *./rebar3 tar* 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
[{"./", "/Users/juise/Documents/x/_build/default/rel/x"},
> {"log/sasl", "/Users/juise/Documents/x/_build/default/rel/x/log/sasl"}]
which cause endless loop.
I see multiple solutions:
- ./rebar3 tar must archive all files in release directory, and not pay
attention to overlay directive;
- relx should ignore mappings like {"./",
"/Users/juise/Documents/x/_build/default/rel/x"};
- erl_tar should explicitly ignore result archive and don't add to himself.
--
Петровский Александр / Alexander Petrovsky,
Skype: askjuise
Phone: +7 931 9877991
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171108/2497b68a/attachment.htm>
More information about the erlang-questions
mailing list