Plugins are different from other areas of this repository, since they may include user data, or other non-source-code data. As such, they've been separated out into sub-modules, with separate permissions and governance flows.
This folder location can be customized using the PATH_TO_PLUGINS
environmental variable.
This folder contains all of the Plugin directories, each of which is associated with a Project. Since the naming and directory structure of the Projects is not strictly canonical, a mapping file is used to associate each Plugin with it's Project.
To add a new Plugin directory, follow these steps:
- Create a new git repository to contain the Plugin files.
- Add the Project name and corresponding Plugin and repository name to the
project-plugin-map.json
file. (i.e. "Project": {"dir": "Plugin", "repo": "Plugin-Plugins"}) - Create a submodule to track the plugin from the main respository (
git submodule add https://github.com/Superalgos/<plugin-name>-Plugins.git Plugins/<plugin-name>
)
To update an existing plugin, change the files in ./Plugins/<plugin-name>
, as usual. When it comes time to commit your changes, you will have to do two commits: one to the plugin submodule, then one to update the reference to the plugin submodule.
For example, lets say that I (user isysd-mirror) wish to change my user profile, which is part of the Governance plugin. Assume I've already made the changes to the file, and now wish to submit them via command line. The commands would be:
# change to the plugin repo / directory
cd Plugins/Governance
# add and commit your changed files
git add User-Profiles/isysd-mirror.json
git commit -m "change user profile isysd-mirror"
# push your commits to your fork
git push origin develop
# at this point, you can create a PR from your Governance-Plugins fork
# go back to the main Superalgos repo
cd ../../
# update reference for the Governance plugin to the commit you made above
git add Plugins/Governance
# commit and push your changes to Superalgos
git commit -m "update Governance plugin reference"
git push origin develop
# at this point, you can create a PR from your Superalgos fork