-
-
Notifications
You must be signed in to change notification settings - Fork 13
Description
As a repository manager, renaming files is a fairly common requirement.
Currently the name of a target file can be changed, but the old filename isnt scheduled for deletion at the same time.
It may seem obvious that the old file needs to be deleted, especially when the template writer and template users (repo managers) are the same people, but newbies dont learn 'obvious' without clues, and a central configuration management should be able to automatically manage updated to a large number of managed projects which have different teams/repo managers.
The new-file template rule and the old-file delete rule should be together in the same section of the mobanfile. i.e. under targets:
Having learnt from copy: which I think should be a plugin per #165 , I believe delete should also be a plugin. It should be a core plugin, as it satisfies a core requirement of moban. It really should be a plugin, because people should be able to customise moban with plugins which can perform deletions in a way that the moban engine understands.
The easiest syntax would be:
targets:
- foo: # implicit empty/null/etcHowever that allows unintended deletes to occur very easily.
Much better would be to require an explicit datatype, such as false
targets:
- foo: false # explicit deleteIf yaml datatype extensions in #165 are implemented, the following would also be possible
targets:
- !delete foo # explicit delete