Rework special values syntax
Opened this issue · 0 comments
ccremer commented
ModuleSync knows 2 kinds of special values:
delete
unmanaged
From a syntax perspective, it's easy to mistake them for variables that are being used in templates.
However, greposync shall make this more explicit and also make those free for use in templates.
Furthermore, greposync supports more special values:
targetPath
initOnly
(possibly, see #100 )
Proposal:
- Rename parameter
targetPath
to:special:targetPath
- Rename parameter
delete
to:special:delete
* - Rename parameter
unmanaged
to:special:unmanaged
*
*This will cause a breaking change for all .sync.yml
files in all managed repos. To make migration easier, the following shall be done:
- Offer a migration CLI flag, e.g.
--migrate-special-values
that replacesdelete
andunmanaged
with the new parameter names and includes the change in the commit. Note: We'd have to search-replace line-by-line and cannot read/write as YAML, as that likely removes any user comments. - If only the legacy parameters are present, use those
- If new parameters are present, use the new ones (regardless whether legacy parameters are present or not)