Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework special values syntax #114

Open
ccremer opened this issue Oct 9, 2021 · 0 comments
Open

Rework special values syntax #114

ccremer opened this issue Oct 9, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@ccremer
Copy link
Owner

ccremer commented Oct 9, 2021

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:

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 replaces delete and unmanaged 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)
@ccremer ccremer added the enhancement New feature or request label Oct 9, 2021
@ccremer ccremer added this to the v0.3.0 milestone Oct 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant