erlware / relx

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

Allow for API callers to define arbitrary overlay variables #749

Closed g-andrade closed 5 years ago

g-andrade commented 5 years ago

This PR proposes adding support for overlay variables arbitrarily defined by API callers, as a basis to solve rebar3 issue 1254.

ferd commented 5 years ago

I think it would be interesting to define (through the test) what happens when a local relx overlay var overrides the name of a value provided by the caller overlay API (the local one should win, to avoid breaking anything?)

g-andrade commented 5 years ago

I think it would be interesting to define (through the test) what happens when a local relx overlay var overrides the name of a value provided by the caller overlay API (the local one should win, to avoid breaking anything?)

Good one! Making it work was trickier than I expected due to file overlays, but I think I got it.

Three different kinds of overrides are now covered by the modified test case (a release variable, a state variable and an overlay file variable.)