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.
Users:
first, cd in the Server/Plugins directory
Code:
[qraut@alkaid cuberite]$ cd Server/Plugins/
then modify the .gitignore and remove the last '*/' line
now add your github repo and push the code (like explained on the github page, if the repository is empty
Code:
[qraut@alkaid PaintBall]$ git remote add origin git@github.com:Schwertspize/PaintBall.git
[qraut@alkaid PaintBall]$ git push -u origin master
Counting objects: 11, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 9.98 KiB | 0 bytes/s, done.
Total 11 (delta 0), reused 0 (delta 0)
To git@github.com:Schwertspize/PaintBall.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
Done! users can now clone your code (or use it as submodule, as i explained). Now you should add a LICENCE and a README, after that add them and commit
10-28-2015, 01:04 AM (This post was last modified: 10-28-2015, 01:07 AM by NiLSPACE.)
Good idea, thanks, but are you going to continue developing the paintball plugin? If not you might want to create a link to my repo instead so people get updates when I make fixes.
Also, I'm not sure if this is the right place to post this.
It's a good idea to stick this yes, but this isn't the right place for it. Plugin Releases is for.. well.. plugin releases I believe Cuberite Discussion or Plugin / Lua Discussion is a better place, but I'll wait with moving it until more agree
Perhaps instead of having a single link you could give some examples like WorldEdit, Essentials or Gallery
10-28-2015, 04:11 AM (This post was last modified: 10-28-2015, 04:13 AM by Schwertspize.)
what do you mean with examples? just provide more examples for users....
if you think it doesn't fit here, why don't you move it, you are admin? and, the reason why I posted it here is, many people just read the list and want to use. as long as there are no referees from plugin threads, no one who should use it would see it.
10-28-2015, 04:56 AM (This post was last modified: 10-28-2015, 04:57 AM by NiLSPACE.)
Yes, just give them more examples That would allow beginners to test it on more plugins. Or that's just me talking about how I would react if I were completely new to this
Yeah, I can move it, but I don't know where. I guess I can stick it already though
Thinking about it this is actually the perfect place to put it. Forget everything I said
I don't think you should be adding submodules - they will want to get checked into the main repo if you commit anything from your folder. Instead, do a clean git clone into the plugin's folder:
Code:
cd Plugins/MyPlugin
git clone https://github.com/madmaxoft/MyPlugin.git .
@xoft I don't think if you develop, you should never use a version where you play on, install plugins,... you'd better create a fork of the main repo and edit this separately. (or, as I do, make changes to your "normal" server, compile and test, and after that, if it's working, rebase it onto the fork and make a clean test. then commit in your fork and push.