Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
[LOC-6171] Fetch plugin updates from WPE servers (#223)
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.

* chore: bump version to 0.3.2, add changelog

* ci: try newer ubuntu image

Docker install is failing across the board due to
a missing/old containerd dep.

"The following packages have unmet dependencies:
 docker.io : Depends: containerd (>= 1.2.6-0ubuntu1~)
E: Unable to correct problems, you have held broken packages."

https://app.circleci.com/pipelines/github/studiopress/pattern-manager/1452/workflows/100cefa1-1714-484f-8fb4-1afe859ec89c/jobs/7312

* chore: ignore error_log lint

* chore: use namespace
  • Loading branch information
nickcernis authored Oct 16, 2024
1 parent 7653a93 commit 53750a5
Show file tree
Hide file tree
Showing 4 changed files with 335 additions and 92 deletions.
150 changes: 60 additions & 90 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1

orbs:
node: circleci/node@5.0
wp-svn: studiopress/wp-svn@0.2
# wp-svn: studiopress/wp-svn@0.2

references:
PLUGIN_PATH: &PLUGIN_PATH
Expand All @@ -11,15 +11,10 @@ references:
jobs:
lint-php:
machine:
image: ubuntu-2004:current
image: ubuntu-2204:current
steps:
- checkout:
path: *PLUGIN_PATH
- run:
name: Install Docker
command: |
sudo apt-get update
sudo apt-get install -y docker.io
- run:
name: Installing Pluginade
working_directory: *PLUGIN_PATH
Expand All @@ -30,15 +25,10 @@ jobs:
command: sh pluginade.sh lint:php
lint-js:
machine:
image: ubuntu-2004:current
image: ubuntu-2204:current
steps:
- checkout:
path: *PLUGIN_PATH
- run:
name: Install Docker
command: |
sudo apt-get update
sudo apt-get install -y docker.io
- run:
name: Installing Pluginade
working_directory: *PLUGIN_PATH
Expand All @@ -50,15 +40,10 @@ jobs:
sh pluginade.sh lint:js
lint-css:
machine:
image: ubuntu-2004:current
image: ubuntu-2204:current
steps:
- checkout:
path: *PLUGIN_PATH
- run:
name: Install Docker
command: |
sudo apt-get update
sudo apt-get install -y docker.io
- run:
name: Installing Pluginade
working_directory: *PLUGIN_PATH
Expand All @@ -70,15 +55,10 @@ jobs:
sh pluginade.sh lint:css
test-js:
machine:
image: ubuntu-2004:current
image: ubuntu-2204:current
steps:
- checkout:
path: *PLUGIN_PATH
- run:
name: Install Docker
command: |
sudo apt-get update
sudo apt-get install -y docker.io
- run:
name: Installing Pluginade
working_directory: *PLUGIN_PATH
Expand All @@ -89,15 +69,10 @@ jobs:
command: sh pluginade.sh test:js
phpunit:
machine:
image: ubuntu-2004:current
image: ubuntu-2204:current
steps:
- checkout:
path: *PLUGIN_PATH
- run:
name: Install Docker
command: |
sudo apt-get update
sudo apt-get install -y docker.io
- run:
name: Installing Pluginade
working_directory: *PLUGIN_PATH
Expand All @@ -110,15 +85,10 @@ jobs:
sh pluginade.sh test:phpunit
zip:
machine:
image: ubuntu-2004:current
image: ubuntu-2204:current
steps:
- checkout:
path: *PLUGIN_PATH
- run:
name: Install Docker
command: |
sudo apt-get update
sudo apt-get install -y docker.io
- run:
name: Installing Pluginade
working_directory: *PLUGIN_PATH
Expand All @@ -131,22 +101,22 @@ jobs:
sh pluginade.sh zip
- store_artifacts:
path: /home/circleci/Downloads
svn-deploy:
docker:
- image: cimg/base:stable
steps:
- checkout:
path: *PLUGIN_PATH
- node/install:
node-version: '14'
- run:
name: Building the plugin
working_directory: *PLUGIN_PATH
command: |
sh pluginade.sh build
- wp-svn/deploy-plugin:
plugin-path: *PLUGIN_PATH
wporg-assets-directory: wporg
# svn-deploy:
# docker:
# - image: cimg/base:stable
# steps:
# - checkout:
# path: *PLUGIN_PATH
# - node/install:
# node-version: '14'
# - run:
# name: Building the plugin
# working_directory: *PLUGIN_PATH
# command: |
# sh pluginade.sh build
# - wp-svn/deploy-plugin:
# plugin-path: *PLUGIN_PATH
# wporg-assets-directory: wporg

workflows:
build:
Expand All @@ -160,40 +130,40 @@ workflows:
# parameters:
# php-version: [ '7.4', '8.0', '8.1', '8.2' ]
- zip
- wp-svn/check-versions:
filters:
tags:
only: /^\d+\.\d+\.\d+$/
branches:
only: /^release\/.*/
- svn-deploy:
context: genesis-svn
requires:
- wp-svn/check-versions
- lint-php
- lint-js
- lint-css
- test-js
- phpunit
filters:
tags:
only: /^\d+\.\d+\.\d+$/
branches:
ignore: /.*/
- approval-for-deploy-tested-up-to-bump:
type: approval
requires:
- lint-php
- lint-js
- lint-css
- test-js
- phpunit
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
# - wp-svn/check-versions:
# filters:
# tags:
# only: /^\d+\.\d+\.\d+$/
# branches:
# only: /^release\/.*/
# - svn-deploy:
# context: genesis-svn
# requires:
# - wp-svn/check-versions
# - lint-php
# - lint-js
# - lint-css
# - test-js
# - phpunit
# filters:
# tags:
# only: /^\d+\.\d+\.\d+$/
# branches:
# ignore: /.*/
# - approval-for-deploy-tested-up-to-bump:
# type: approval
# requires:
# - lint-php
# - lint-js
# - lint-css
# - test-js
# - phpunit
# 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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://wpengine.com
Tags: pattern, patterns, pattern design, pattern builder, block patterns
Requires at least: 6.1
Tested up to: 6.3
Stable tag: 0.3.1
Stable tag: 0.3.2
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -114,6 +114,9 @@ Yes, you will need to have WordPress 6.1 or later installed to take advantage of

## Changelog

### 0.3.2
* Pattern Manager now uses its own update mechanism from WP Engine servers.

### 0.3.1
* Fix a minor security issue.

Expand Down
Loading

0 comments on commit 53750a5

Please sign in to comment.