XF 2.2 Addon Development with Multiple Computers and SCM


I've developed a few open source addons, mostly for personal use. I have three different computers I use for development, so I make extensive use of source control to allow me to seamlessly move between them. This works fine for my day job (C++), but in my pursuit of writing some XF addons for fun, it's a bit messy.

For example, assume I'm running XAMPP with XF installed on ComputerA and ComputerB. Let's say I start on ComputerA, and I run php cmd.php xf-addon:create, do a little work and push my changes to git/mercurial/whatever. Then I move to ComputerB, I clone/pull those changes, but how do I get that addon into that instance of XF? I have to do xf-addon:build-release on ComputerA, check that .zip into git, and then pull and install that on ComputerB?

This also creates a challenge because I want XF to use the actual folder that I've cloned -- to solve this what I've been doing is building a release .zip on ComputerA, installing that on ComputerB which creates something like /home/zethon/dev/www-xf/src/addons/MyName/MyAddon. Then I clone my code into /home/zethon/src/MyAddon, delete/rename the folder that XF created, and then create a soft-ink /home/zethon/dev/www-xf/src/addons/MyName/MyAddon->/home/zethon/src/MyAddon.

This all feels very hackish in order to do something that is relatively common for anyone that does software development. What I would love is way for XF to import/create/update an addon from a folder, so that when I pull down the latest code on ComputerB I can tell XF "update the templates, phrases and other things from this source folder", so that I didn't have to do a build-release until I was actually ready to build a release version.

I'm curious as to how other people these situations?
You can check the add-on directory itself into version control, and import data from the _output directory with php cmd.php xf-dev:import -a MyName/MyAddOn. It may be worth reviewing the full list of CLI commands for further insights (php cmd.php xf list).
Top Bottom