Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): update add-ons from GitHub #1390

Closed
2 of 3 tasks
DevinWalker opened this issue Jan 17, 2017 · 7 comments
Closed
2 of 3 tasks

feat(cli): update add-ons from GitHub #1390

DevinWalker opened this issue Jan 17, 2017 · 7 comments
Assignees

Comments

@DevinWalker
Copy link
Member

DevinWalker commented Jan 17, 2017

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

  • Develop new CLI Commands
  • Test
  • Update CLI documentation
@DevinWalker DevinWalker added this to the 2.0 milestone Jan 17, 2017
@DevinWalker DevinWalker modified the milestones: 2.0, 2.1 May 26, 2017
@DevinWalker DevinWalker assigned Sidsector9 and unassigned ravinderk Feb 28, 2018
@DevinWalker DevinWalker modified the milestones: 2.1, 2.5 Feb 28, 2018
@DevinWalker DevinWalker removed this from the 2.5 milestone Feb 28, 2018
@kevinwhoffman kevinwhoffman changed the title Give CLI enhancement: Update all or specific add-ons via git feat(cli): update add-ons from GitHub Mar 14, 2018
@kevinwhoffman
Copy link
Contributor

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

@Sidsector9
Copy link
Contributor

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

@slewisma
Copy link

slewisma commented May 9, 2018

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.

@Benunc
Copy link
Member

Benunc commented May 9, 2018

@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.

@DevinWalker
Copy link
Member Author

@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.

DevinWalker pushed a commit that referenced this issue May 17, 2018
feat(cli): update add-ons from GitHub #1390
@raftaar1191
Copy link
Contributor

@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

@ravinderk
Copy link
Collaborator

ravinderk commented May 23, 2018

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants