Skip to content

Support a full dev => production workflow #7

@CurtisL

Description

@CurtisL

The goal here is to work out how this script could be used from a server in a production environment.

Considerations

  • Production specific commands that don't prompt for input and provides no output. (support optional --verbose flag for detailed output)
  • Support the notion of a dev only plugin that will not be installed/activated during production commands
  • New project file structure to clarify dev vs production resources.

Add either additional config object for dev_plugins: {} or a dev_only: true/false; flag to the existing plugin objects.

Support for a --development or --production flag during various wp project commands

--production:

Default when no flag provided.

Skip various prompts with the expectation the command is being ran on a production server or as part of a post-deploy script where output stream wouldn't be interactive.

Skips gitignore modifications and skips save commands.

Skips any plugins indicated to be for development.

Updates by default but can customize the configuration object for when a plugin version is missing from wordpress.org.

Disables the uninstall command.

  {
    "slug": "plugin-slug",
    "version": "1.0",
    "active": true,
    "custom": false,
    "dev_only": false,
    "missing_version": "update"  // or "skip",
  },

--development

This command should be the way things current work, all the prompts, git ignore integration etc.

Proposal for new command(s):

Plugin Save

wp project save-plugin <plugin-slug> <env-flag>

This would convert that specific plugin config for a specified env.

Saving a production plugin

wp project save-plugin woocommerce <optional --production flag>

Saving a development plugin

wp project save-plugin debug-bar --development

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions