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

[Feature] Custom Manifests Modification #6287

Open
StructSeeker opened this issue Feb 14, 2025 · 0 comments
Open

[Feature] Custom Manifests Modification #6287

StructSeeker opened this issue Feb 14, 2025 · 0 comments

Comments

@StructSeeker
Copy link

StructSeeker commented Feb 14, 2025

Gist: allow user-defined modification to app manifest. Many apps exhibit polymorphic behavior depending on the content in folder. For example, app may create initial new config file at their first startup if no config file is detected. Or, user may need to define some other files and folders need to persist in addition to those defined in manifest. Custom Manifest allow user to deal with these issues more flexibly.

Design: User may add a folder to local bucket respository (main, for example). Inside the folder contains

  • a .gitignore file such that the whole folder is ignored by git
  • multiple appname.custom.json file describing the user's modification to the manifest file.

appname.custom.json describe the modification to property among pre_install, post_install, pre_uninstall, post_uninstall, persist, ##, suggest, description as follows:

  • "propertyName-prepend" : arraylikeObj, Contencate the arraylikeObj before the original arraylikeObj value
  • "propertyName-append" : similarly,
  • "propertyName-remove" : regex|array, find all recursively matching item in the original array and delete them
  • "propertyName-override" : obj, Replace the original obj with new obj.

appname.custom.json may also have a validate property that check whether the hash or other property of the appname.json is as expected.

The new manifest.json is generated before and used during the installation. Eventually it and the appname.custom.json are both saved in $dir for each app.
For example, user may want add "persist": ["appname.custom.json"] to persist their modified manifest for convenience.

Please tell me your opinion on this proposal, is it practical? does it violate the philosophy of scoop? Or do you have a better idea on local customization of manifest?

Another way to do it may be using rebase-pull for bucket update and let each user manage their local bucket respository, i am not sure whether it's good practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant