10-27-2015, 09:40 PM
(This post was last modified: 06-20-2016, 06:22 AM by Schwertspize.)
Guide: How to release plugins and use them the right way
I want to show you a tutorial how you could add your plugins to your server easily (and how to update them), and how you should release your plugins, so they can be used easily.
First, image the situation if you have compiled. You have a Server/Plugins dir where many Plugins are in there, eg Core. as user, the easiest way to set up a new plugin is, if it is on github or similar (any system that uses git), to cd into the Plugins dir and do "git submodule add <git url here>". git will now download it and place it into the Plugins dir. The big advantage of this method is, that every time you run "git submodule update" git checks for new versions of plugins and installs them. Thats great, but now the better part. Every time you compile the server (with compile.sh) to update the server, the script also runs "git submodule update" and updates all Plugins, both shipped with Cuberite and those who you added later on.
So, this part for plugin devs.... Please place your plugins in a git repository (anywhere, just git, probably github) and let them contain only the directory to place in Plugins/. If you have more than one folder, eg the webadmin part, then place it in a seperate repository, so users can do a "git submodule" in Plugins/ and one in webadmin/files/.
Why? because git lets you only add submodules (and clone those) into an empty directory. So if you need both, a webadmin part and one in Plugins/, place it into two repositories, it's still free, and name it eg <my-cool-plugin>-webadmin and <my-cool-plugin>. Also please provide a short message that and why you did it, please refer to this post.
For those who did not understand what i mean, a short review of what you have to do.
I want to show you a tutorial how you could add your plugins to your server easily (and how to update them), and how you should release your plugins, so they can be used easily.
First, image the situation if you have compiled. You have a Server/Plugins dir where many Plugins are in there, eg Core. as user, the easiest way to set up a new plugin is, if it is on github or similar (any system that uses git), to cd into the Plugins dir and do "git submodule add <git url here>". git will now download it and place it into the Plugins dir. The big advantage of this method is, that every time you run "git submodule update" git checks for new versions of plugins and installs them. Thats great, but now the better part. Every time you compile the server (with compile.sh) to update the server, the script also runs "git submodule update" and updates all Plugins, both shipped with Cuberite and those who you added later on.
So, this part for plugin devs.... Please place your plugins in a git repository (anywhere, just git, probably github) and let them contain only the directory to place in Plugins/. If you have more than one folder, eg the webadmin part, then place it in a seperate repository, so users can do a "git submodule" in Plugins/ and one in webadmin/files/.
Why? because git lets you only add submodules (and clone those) into an empty directory. So if you need both, a webadmin part and one in Plugins/, place it into two repositories, it's still free, and name it eg <my-cool-plugin>-webadmin and <my-cool-plugin>. Also please provide a short message that and why you did it, please refer to this post.
For those who did not understand what i mean, a short review of what you have to do.
Users:
Devs: