-
Notifications
You must be signed in to change notification settings - Fork 9
add support for .fengine-reset-ignore #568
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
base: main
Are you sure you want to change the base?
Conversation
… directories during reset endpoint invocation
| To achieve this, you can create a file called `.foxops-reset-ignore` in the root of your template. It would propagate it | ||
| to the root of your incarnation repository. | ||
|
|
||
| This file should contain a list of file paths (one per line) that should be ignored during the reset process. No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should contain a list of file paths
Maybe it's just me, but I understand that a file path should support nested exclusions. For example, I would like to exclude a specific file, such as example/file1, while still being able to delete another file, like example/file2.
In my opinion, this would be the ideal solution. So might be nice to change to code to actually support this functionality 😄 .
However, the current approach only works at the root level, meaning files can only be excluded at the root level from being removed during a reset.
| if file.name == ".git": | ||
| continue | ||
|
|
||
| if file.name in ignore_list: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not excluding the
.fengine-reset-ignore file here. So we are going to delete it on reset...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not necessarily. if it is part of the template, it won't be deleted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, however, I would assume that most people would not include this as part of the template but rather commit it along with some other "untracked" files. At least, that's how I would use it. However, if it is part of the template, we would not need this extra check.
Add support for .fengine-reset-ignore to preserve specified files and directories during reset endpoint invocation.