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

Opt in to receiving non-stable updates #3560

Open
wants to merge 51 commits into
base: develop
Choose a base branch
from

Conversation

pierlon
Copy link
Contributor

@pierlon pierlon commented Oct 19, 2019

Summary

This PR adds a plugin called "AMP Beta Tester" to opt-in to receiving updates released on GitHub.

Addresses issue #2084.

To-do:

  • Hide plugin updates if working from source
  • Force WP to do a plugin update check on plugin activation (this allows for the plugin update cache to be modified)
  • Remove any plugin data and restore plugin update cache on deactivation
  • Update plugin details to reflect that of GitHub release
  • Move plugin to the correct folder when updated
  • Add an option to control auto updating of the plugin
  • Update tests for relevant sections of code

Checklist:

  • My pull request is addressing an open issue (please create one otherwise).
  • My code is tested and passes existing tests.
  • My code follows the Engineering Guidelines (updates are often made to the guidelines, check it out periodically).

@googlebot googlebot added the cla: yes Signed the Google CLA label Oct 19, 2019
@pierlon pierlon force-pushed the enhancement/2084-add-opt-in-to-beta-feature branch from 060463e to 0c1cec2 Compare October 20, 2019 06:21
amp-beta-tester.php Outdated Show resolved Hide resolved
@pierlon
Copy link
Contributor Author

pierlon commented Oct 22, 2019

At the moment, the plugin works as intended; that is, upgrading the AMP plugin to the latest non-stable release on GitHub. Things to note:

  • Upgrading will remove the plugin directory

  • Upgrading to 1.4.0-beta1 is not recommended, since it does not include this plugin

Regarding the failing tests, the main blocker is that files are not being required correctly due to a problem with having multiple plugin files in one directory (see PR at xwp/wp-dev-lib#307). I'm currently waiting on @kasparsd's approval so that it can get merged and released as a minor update.

tests/php/bootstrap.php Outdated Show resolved Hide resolved
@swissspidy
Copy link
Collaborator

Upgrading to 1.4.0-beta1 is not recommended, since it does not include this plugin

When I am running the current beta / develop branch, does it even suggest upgrading to 1.4.0-beta1? If so, that sounds wrong.

phpcs.xml Outdated Show resolved Hide resolved
amp-beta-tester.php Outdated Show resolved Hide resolved
amp-beta-tester.php Outdated Show resolved Hide resolved
amp-beta-tester.php Outdated Show resolved Hide resolved
amp-beta-tester.php Outdated Show resolved Hide resolved
@kasparsd
Copy link

@pierlon Version 1.3.0 of wp-dev-lib is out now.

@westonruter
Copy link
Member

@pierlon Version 1.3.0 of wp-dev-lib is out now.

Updated develop: #3589

amp-beta-tester.php Outdated Show resolved Hide resolved
@pierlon pierlon force-pushed the enhancement/2084-add-opt-in-to-beta-feature branch from 7149afa to ac056eb Compare October 22, 2019 18:44
@pierlon
Copy link
Contributor Author

pierlon commented Oct 22, 2019

Upgrading to 1.4.0-beta1 is not recommended, since it does not include this plugin

When I am running the current beta / develop branch, does it even suggest upgrading to 1.4.0-beta1? If so, that sounds wrong.

@swissspidy, fixed.

@pierlon
Copy link
Contributor Author

pierlon commented Oct 22, 2019

Just to note, an update for the beta plugin will show if both the AMP and beta tester plugins are not active:

image

See #3560 (comment) as to why.

@pierlon pierlon changed the title [WIP] Opt in to a release channel Opt in to receiving non-stable updates Oct 23, 2019
@pierlon pierlon marked this pull request as ready for review October 23, 2019 07:33
@swissspidy
Copy link
Collaborator

Lots of great progress here, really awesome to see! 🎉

Just to note, an update for the beta plugin will show if both the AMP and beta tester plugins are not active:

I think the AMP Beta Tester plugin should just have the same version number as the plugin then to solve this.

amp-beta-tester.php Outdated Show resolved Hide resolved
amp-beta-tester.php Outdated Show resolved Hide resolved
pierlon and others added 21 commits December 9, 2019 15:40
Due to the WordPress Plugin Update API using the folder of the main PHP file as an identifier for updates (`amp` in this case), any other plugin file that is placed in the same folder will have the same version number as the AMP plugin.

Setting the plugin version to that of the AMP plugin or greater will solve this problem.
 Check for optional patch number, and generalize the identifier for determining pre-releases as '-' would be sufficient.

 Co-Authored-By: Weston Ruter <[email protected]>
@pierlon pierlon force-pushed the enhancement/2084-add-opt-in-to-beta-feature branch from 4165a25 to d6dc471 Compare December 11, 2019 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Signed the Google CLA WS:Core Work stream for Plugin core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants