modulesync icon indicating copy to clipboard operation
modulesync copied to clipboard

Allow to override the target path of a templated file

Open ccremer opened this issue 3 years ago • 0 comments

Files specified in config_defaults.yml and .sync.yml assume a static path that is the same for all managed modules.

however, there are cases where the content of a ERB template is managed in those modules, but the directory where this file is being saved is different for each module.

For example, the template may have a template/some_file.ext, but in the managed module it could be the module name, e.g. my-module/some_file.ext.

I could imagine a config like this: .sync.yml

template/some_file.ext:
  targetPath: my-module/some_file.ext

or in configs_defaults.yml:

template/some_file.ext:
  targetPath: <%= @metadata[:module_name] %>/some_file.ext

ccremer avatar Jun 24 '21 14:06 ccremer