grunt-wordpress icon indicating copy to clipboard operation
grunt-wordpress copied to clipboard

Change order of deployment

Open scottgonzalez opened this issue 11 years ago • 1 comments

The wordpress-sync task currently runs wordpress-sync-terms, then wordpress-sync-posts, then wordpress-sync-resources. This means that a post can be updated and link to a resource that hasn't been published yet. To prevent this problems, the sync tasks should be split. I think the right order is:

  1. Add/edit terms
  2. Add/edit resources
  3. Add/edit posts
  4. Remove posts
  5. Remove resources
  6. Remove terms

scottgonzalez avatar Oct 16 '14 18:10 scottgonzalez

Removing terms at the end also allows posts to use keywords that aren't defined up front. See https://github.com/scottgonzalez/grunt-wordpress/blob/f368a4a17b304da6708ea6c59201b0abbf818cb2/tasks/wordpress/taxonomies.js#L272.

scottgonzalez avatar Nov 10 '14 16:11 scottgonzalez