Closed webflo closed 10 years ago
In general, I agree that this functionality is appropriate for Drush core. Thanks.
Perhaps @msonnabaum and others could chime in on what they envision here.
Just a quick answer for 1 and 3. I try to work on examples and --simulate soon.
(1.) In my local env, the webserver writes the config files with 755. It is just to make sure that there are no unnecessary permission changes which pollute this git diff. Maybe thats a problem which my local configuration? All other files are 644 by default. I think it makes sense to maintain the same permissions for config files.
(3.) I use the -p option to stage/commit only some changes from my configuration. I like to split changes in multiple commits meaningful instead of one big "snapshot commit". It is also a good practice to review the changes.
oh, I just opened a related PR that implements config-export - see #253 I've been using rsync to implement the command to speed things up though. Sry for the dupe, but I guess github cannot handle multiple PR/patches in one issue anyway?
@webflo I do not get how you use the export directory, where is the difference between staging and export in your workflow?
@fago I thought Drupal delete the fields vom staging after a successful import. But currently it does not. So i think i your are right. I do not need the export folder at all.
I committed @fago version of config-export. I think the main interesting bit that isn't committed from drush/cmi.drush.inc is the git add -p
part. I think it is pretty novel and will give people good direction of how CMI should interact with git. On the other hand, it is just one CLI command and folks can run it by hand if they want. So, not sure if config-export-git command belongs in Drush. It could alternatively be a commented out shell alias in example.drushrc.php
Maybe we should add a --add option to config-export and that does the git add -p
I did add the optional git operation BTW
Thanks, looks great!
I just added the ability for config-export and config-import to use alternate $destination and $source respectively. I think that will be useful if folks use alternate directories to store config as proposed in that @UEBERBIT code. This obviates the need to copy files to $staging dir before importing, for example.
I uploaded our (@UEBERBIT) Drupal 8 project template yesterday. It contains a few drush commands to easy the developer workflow. @berdir and some other people from IRC liked the drush commands and suggested they should be in Drush core.
We should discuss how these commands should work and which options we need. Basically this is the equivalent to features-update/revert in D7.
Please look at drush/cmi.drush.inc
Some background information: CMI Workflow on Drupal Answers, D8 Project Template