Skip to content

Commit

Permalink
[LOC-6172] Fetch plugin updates from WPE servers (#22)
Browse files Browse the repository at this point in the history
* feat: get plugin updates from WPE

Adapted from the sample code at https://github.com/wpengine/plugin-updater.

* ci: comment out wp-svn usage

This plugin can no longer be published on WP.org due to blocked access.

We'll just lint in Circle for now.

* chore: add npm run zip script

To make it easier to package a zip for production.

Also replaces now-outdated Gruntfile and npm
internationalization package with WP-CLI's language file generation.

* chore: bump version to 1.0.2, add changelog
  • Loading branch information
nickcernis authored Oct 15, 2024
1 parent 653f6b3 commit 989868a
Show file tree
Hide file tree
Showing 12 changed files with 452 additions and 353 deletions.
30 changes: 15 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
wp-svn: studiopress/[email protected]
# orbs:
# wp-svn: studiopress/[email protected]

jobs:
test:
Expand All @@ -23,16 +23,16 @@ workflows:
test-deploy:
jobs:
- test
- approval-for-deploy-tested-up-to-bump:
type: approval
requires:
- test
filters:
tags:
ignore: /.*/
branches:
only: /^bump-tested-up-to.*/
- wp-svn/deploy-tested-up-to-bump:
context: genesis-svn
requires:
- approval-for-deploy-tested-up-to-bump
# - approval-for-deploy-tested-up-to-bump:
# type: approval
# requires:
# - test
# filters:
# tags:
# ignore: /.*/
# branches:
# only: /^bump-tested-up-to.*/
# - wp-svn/deploy-tested-up-to-bump:
# context: genesis-svn
# requires:
# - approval-for-deploy-tested-up-to-bump
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ Thumbs.db
.svn
node_modules/
vendor/
*.zip
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
9 changes: 9 additions & 0 deletions .svnignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,13 @@
.gitignore
.gitattributes
.svnignore
.nvmrc
.DS_Store
.circleci/
package.json
package-lock.json
composer.json
composer.lock
node_modules
scripts/
*.zip
96 changes: 0 additions & 96 deletions Gruntfile.js

This file was deleted.

16 changes: 15 additions & 1 deletion genesis-beta-tester.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Author: Nathan Rice
* Author URI: http://www.nathanrice.net/
* Version: 1.0.1
* Version: 1.0.2
* Text Domain: genesis-beta-tester
* Domain Path: /languages/
Expand Down Expand Up @@ -55,3 +55,17 @@ function genesis_beta_tester_activation_hook() {
function genesis_beta_tester_init() {
new Genesis_Beta_Tester();
}

/**
* Initialize checking of plugin updates from WP Engine.
*/
function genesis_beta_tester_check_for_upgrades() {
$properties = array(
'plugin_slug' => 'genesis-beta-tester',
'plugin_basename' => plugin_basename( __FILE__ ),
);

require_once __DIR__ . '/includes/class-genesis-beta-tester-plugin-updater.php';
new Genesis_Beta_Tester_Plugin_Updater( $properties );
}
add_action( 'admin_init', 'genesis_beta_tester_check_for_upgrades' );
Loading

0 comments on commit 989868a

Please sign in to comment.