Givewp: feat(cli): update add-ons from GitHub

Created on 17 Jan 2017  路  7Comments  路  Source: impress-org/givewp

Issue Overview

If you have a large number of Add-ons cloned into your local development environment they can get out-of-date by upstream commits. There should be an easy way to update them all via Give CLI:

Update All Add-ons

wp give addon update --all

Update Single Add-on

wp give addon update --name=Give-Recurring

Update All and Exclude Option

wp give addon update --all --exclude=Give-Recurring,Give-Stripe

Related Issues

871

Todos

  • [x] Develop new CLI Commands
  • [x] Test
  • [ ] Update CLI documentation

Most helpful comment

I'd like to take this on eventually. I have a good start on it with my existing WP-CLI installation script shown here. https://kevinwhoffman.wistia.com/medias/o1merk8w2o

All 7 comments

I'd like to take this on eventually. I have a good start on it with my existing WP-CLI installation script shown here. https://kevinwhoffman.wistia.com/medias/o1merk8w2o

Call Summary

Participants: @ravinderk and @sidsector9
Topic: Scope of this feature
Result: The discussion raised few questions as follows:

  1. Is this for developers only, or can the end-users use it to update their addons too?
  2. How should the updates happen? Pulling the latest master from GitHub or license-based where the CLI will check for license and download and unpack a new zip?
  3. There might be situations where shell scripts might get involved, for example: To check if git is installed, check for exit codes, etc. If so, then can we use shell scripts wherever required?

CC: @DevinWalker

Not sure if this belongs with this issue or a new issue but I'd love to have an easy way to keep a set of Give add-ons installed and up-to-date on my demo and development systems without having license warnings appear and without having to copy the add-ons from another installation to get the updates. I'd be fine if these were limited to the test gateway only as these systems are not in production and are only used to persuade new customers to use Give and to test customizations I may be working on for customers.

@slewisma I use this snippet in my local/test environments to get rid of the licence warnings:

add_action('admin_head', 'my_custom_admin_css');

function my_custom_admin_css() {
    echo '<style>
    .give-license-notice, #give-invalid-license, .give-invalid-license {
      display: none !important;
    } 
  </style>';
}

But I totally agree that a way to quickly spin up a new install with all the latests from GitHub would be fantastic.

@Sidsector9 @ravinderk my thoughts are as follows:

  1. This is a tool for developers only - mainly speeding up our internal development process
  2. I imagine for the first iteration it would just pull the latest from the repos active branch. For instance, I have recurring installed on release/1.6.2 and stripe on release/2.0.4 then it would pull down from those branches rather than doing and switching or anything like that.
  3. If you think that's a good idea and it's easy to setup and manage without a bunch of bloat. I would like to see the functionality to look in plugins/give-* (non-case sensitive) and then do a git pull.

@Sidsector9 @DevinWalker

Here the WPCIL command is also running for the Add-on that is not activated yet.
I think it should only run for all the add-on that is activated and have a licenses key into it

@raftaar1191

  1. It is only for developers, for now, so do not have to validate license keys.
  2. Since behind the command git is updating the plugin, so you can switch to any branch of addon any time if you are work on something else, so no need to check plugin is active or not.
Was this page helpful?
0 / 5 - 0 ratings