Currently, the only way to set a makefile in a context appears to be in the front-end through the form at node/add/platform which then passes a variable to hosting_hosting_platform_context_options(&$task).
But we appear to initialize the property in provisionContext_platform:
function init_platform() {
$this->setProperty('root');
$this->setProperty('makefile', '');
}
If we're building a platform programatically (from outside of Aegir), the only way I can see to do it is to build the platform using 'drush make' directly, then reference the platform using the '--root' in 'drush provision-save', before going on to call 'provision-verify'. But then the makefile property in the platform context remains blank.
If we lose all reference to the makefile actually used to build the platform, it becomes much harder to rebuild it, should this become necessary. Such as if we wanted to clone such a platform, as in #906936: Allow creation of a platform using an existing platform's information.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | add-makefile-doc-to-provision-save-1336838-2.patch | 1.15 KB | ergonlogic |
Comments
Comment #1
steven jones commentedYou can do this really easily already, e.g.:
Then to get the make to run:
Comment #2
ergonlogicAh, that's good to know.
I guess this needs to be documented then... :p
Comment #3
Anonymous (not verified) commentedThanks! I applied your patch so you retain credit, and then also made a small improvement on the wording to be explicit that it's a Drush makefile and that it's to be used when the codebase doesn't already exist yet.
Comment #4
steven jones commentedThanks to both of you, I've cherry-picked those commits into 6.x-2.x too.