polydigital / backdrop-civicrm-docker

0 stars 1 forks source link

backdrop drush needs to know of civicrm before enabling module #17

Closed tabroughton closed 5 years ago

tabroughton commented 5 years ago

In order to run civicrm-install we backdrop needs to know about the command but the backdrop drush scripts will only detect commands from modules that are enabled.

Enabling civicrm before installing causes catastrophic errors. Not good.

We have had a hack in place to keep a local copy of backdrop.drush.inc which whitelists drush commands backdrop can run. We entered into the list the civicrm-install command, then we kept this local to the backdrop-civicrm-docker project, copying it to the correct place when deploying the containers.

This will cause issues as the file isn't updated when the parent project (backdrop-contrib/drush) updates. We need alternative solution.

Options:

  1. monitor updates to the file somehow and merge changes with local file (flaky and messy)
  2. insert at build/deploy time the line to whitelist civicrm-install to the original file (remove the copy of local file)... we would need to test this with any update to the original file and fix if broken (flaky and hacky)
  3. add the civicrm-install command as a safe command in the upstream project, this isn't such a bad idea other projects shouldn't notice it and the drush command is well tested now.
  4. create a new backdrop module just for civicrm-install that we could enable and run a drush script from (seems a bit sledgehammer)
tabroughton commented 5 years ago

I'm updating from 1) to 2) as both are as flaky as each other but 2) is a bit neater.

tabroughton commented 5 years ago

I will request a PR upstream on the backdrop drush project

tabroughton commented 5 years ago

Boom - it's been accepted :)

tabroughton commented 5 years ago

will need to review dependency management etc so I'll raise an issue for that #18