It is possible to CLI script I possibly could operate on the server (most likely from cron) to set up the brand new .zip file?

I am focusing on a joomla project and I'd like a method to instantly possess the latest version placed on my remote test server after i commit. Presently I build the package after which need to log in to the test server, choose the file, upload. Let me just push the zip file towards the server and also have Joomla get it and do the installation.

  1. Produce a wordpress plugin that ought to be trigger on some option=com_installmyxxzip
  2. Then within the wordpress plugin on event onAfterRoute see if option variable is yours
  3. Now if it's your option then update the module/component/wordpress plugin via below code

    jimport( 'joomla.installer.installer' )

    $installer = new JInstaller()

    $installer->setOverwrite(true)

    $installer->install($path-to-folder)

Indicates challenging

  1. Rather placing a zip, create folder in tmp-path location. Setting up from folder is simpler.
  2. Its easier to look for proper authentication, before doing any serious stuff.

I'm not sure of the existing solution. So if you wish to develop your personal, you will need a publish-commit hook that creates among the following actions:

  • With curl, you can simulate signing in, then calling the administration interface to set up. (You'd need to parse the resulting html-pages, because the form utilizes a hidden token...)
  • A PHP Script that basically calls the Joomla! code of installation, but enables some other type of authentication (e.g. only if known as as CLI, only from localhost etc.).
  • Will it really needs to be installed via Joomla!s interface? You are able to upgrade most modules just by copying the files in to the right folder.
  • Or looking at the files from the version control.