rebar3_cuttlefish icon indicating copy to clipboard operation
rebar3_cuttlefish copied to clipboard

overlay templates are ignored

Open Licenser opened this issue 9 years ago • 4 comments

when running the cuttlefish plugin it is spoosed to not copy files that are already copied by the overlay, however that is not the case.

The problem is in here: https://github.com/tsloughter/rebar3_cuttlefish/blob/master/src/rebar3_cuttlefish_release.erl#L94-L95

Overlays uses relative a path like "apps/howl/priv/howl.schema" however the Schemas are absolute given a paths like "/Users/heinz/Projects/fifo/core/howl/apps/howl/priv/howl.schema"

Licenser avatar Feb 20 '16 02:02 Licenser

Upon further investigation there is another issue for this namely it is here:

https://github.com/tsloughter/rebar3_cuttlefish/blob/master/src/rebar3_cuttlefish_release.erl#L50-L55

this tries to generate the config file based on the overlays found, not the one generated after the overlay.

I know this will require some re-writing but I think the file needs to be generated after relx has run and based on the final .schema files.

The issue here boing that cuttlefish does not allow having substitutions in the schema files.

Licenser avatar Feb 20 '16 22:02 Licenser

@Licenser what about now that the generated conf file is templated: https://github.com/tsloughter/rebar3_cuttlefish/blob/master/src/rebar3_cuttlefish_release.erl#L63

tsloughter avatar Feb 21 '16 21:02 tsloughter

Won't help, the problem is that the cuttlefish schema files contain placeholders, which can't be parsed as they are not valid cuttlefish syntax so the line before L62 crashes.

Licenser avatar Feb 22 '16 01:02 Licenser

That doesn't make sense, I could have swore that is how cuttlefish worked with rebar2/nodepackage.

tsloughter avatar Feb 22 '16 01:02 tsloughter