views:

30

answers:

1

Is there a CLI script I could run on the server (probably from cron) to install the new .zip file?

I'm working on a joomla project and I would like a way to automatically have the new version installed on my remote test server when I commit. Currently I build the package and then have to log into the test server, select the file, upload. I'd like to just push the zip file to the server and have Joomla pick it up and install it.

A: 

I don't know of an existing solution. So if you want to come up with your own, you'll need a post-commit hook that triggers one of the following actions:

  • With curl, you could simulate logging in, then calling the administration interface to install. (You'd have to parse the resulting html-pages, as the form uses a hidden token...)
  • A PHP Script that essentially calls the Joomla! code of installation, but allows an other form of authentication (e.g. only when called as CLI, only from localhost etc.).
  • Does it really has to be installed via Joomla!s interface? You can upgrade most modules by just copying the files into the right folder.
  • Or checking out the files of the version control.
giraff
I considered just copying the files, but I also want it to run the sql install script and I'd like to verify everything is packaged correctly. I'll probably just have to build my own script to call joomla's install code.
Asa Ayers