Installing plugins

Hello, which is the difference of installing a plugin using script/ plugin install, and installing it using svn export?

Hi,

Hello, which is the difference of installing a plugin using script/ plugin install, and installing it using svn export?    If you use svn export you are just copying the code tree to your vendor directory. When you use plugin/install you are also copying the code tree, but the script named "install.rb" at the plug-in root is executed too. If the plug-in needs any kind of installation (like copying some files) then it's likely the code for that will be at the install.rb script. The same is true for uninstalling and the uninstall.rb script.

There a number of plug-ins that don't use the install.rb script but rake tasks instead. Thus, you can install the plug-in either by using install, a checkout, or even by copying the code directly between two projects and then running the installation task.

My personal preference is not to use any code at install.rb but just a simple output of the README file, in which I explain which dependencies -if any- the plugin has, which tasks are included within, which configuration variables are available, and a simple use case.

There is also another difference between using plugin/install and a svn checkout. By using plugin/install you can install a plugin via http, without having subversion installed, so for some cases that would be a plus.

regards,

javier ramírez

Thank you, I didn't know the interaction with install.rb file.

Eduardo Y��ez Parareda wrote:

Hello, which is the difference of installing a plugin using script/ plugin install, and installing it using svn export?

Use piston.

script/plugin install just copies the files in. But script/plugin install -x uses svn:externals to bond your files to two repositories, yours and the plugin's. That's bad because each time that plugin's author commits, you get a new version. That author might practice Continuous Integration!

svn:externals is for sharing code within one team, so you can trust each others' practices.

piston fixes this issue by putting the plugin truly into your own repository, and storing its home repository in its secret properties. Then 'piston update vendor/plugins/thing' will re-download the source, on command. This is ideal, because you can track that plugin's changes and only get what you need.