erlware / relx

Sane, simple release creation for Erlang
http://erlware.github.io/relx
Apache License 2.0
697 stars 232 forks source link

copying config file referenced in a sys.config ? #544

Closed crownedgrouse closed 7 years ago

crownedgrouse commented 7 years ago

Hi, I need a sys.config that includes two other config files, for production and sandbox use. i.e

["production","sandbox"].

directive {sys_config, "rel/sys.config"}. in relx.config copy the file as expected, but do not copy the two other files production.config and sandbox.config while existing in same directory. As config file include is allowed in Erlang, I expected relx allow this. I did not found a way to copy those extra files in release dir by overlay. Is there a tip to do so ? Is it a bug or a missing feature? Any help appreciated :)

crownedgrouse commented 7 years ago

Hum, sorry for the noise. I finally reach to do this by adding

{overlay, [{copy, "rel/production.config", "{{output_dir}}/production.config"}, {copy, "rel/sandbox.config", "{{output_dir}}/sandbox.config"}]}.

this may help however other users. Closing.

lrascao commented 7 years ago

indeed, i also have the same use case, i think the overlays are the best solution for this, you also have the {{release_version}} builtin var so you can build something like releases/{{release_version}}/...