Skip to content

Commit 44c38c6

Browse files
authored
Merge pull request #150 from pantheon-systems/release_0.4.4
Release 0.4.4
2 parents 1c4c2be + 5ebc46c commit 44c38c6

22 files changed

+1148
-626
lines changed

.circleci/config.yml

Lines changed: 2 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,18 @@ workflows:
33
version: 2
44
main:
55
jobs:
6-
- lint
76
- test-behat
8-
- test-phpunit-74
9-
- test-phpunit-82
107
nightly:
118
triggers:
129
- schedule:
1310
cron: "0 0 * * *"
1411
filters:
1512
branches:
1613
only:
17-
- master
14+
- main
1815
jobs:
1916
- test-behat
2017
jobs:
21-
lint:
22-
working_directory: ~/pantheon-systems/pantheon-hud
23-
docker:
24-
- image: quay.io/pantheon-public/build-tools-ci:8.x-php8.2
25-
steps:
26-
- checkout
27-
- restore_cache:
28-
keys:
29-
- test-lint-dependencies-{{ checksum "composer.json" }}
30-
- run: composer install -n --prefer-dist
31-
- save_cache:
32-
key: test-lint-dependencies-{{ checksum "composer.json" }}
33-
paths:
34-
- vendor
35-
- run:
36-
name: "Run PHP Lint"
37-
command: |
38-
composer phpcs
3918
test-behat:
4019
working_directory: ~/pantheon-systems/pantheon-hud
4120
parallelism: 1
@@ -76,84 +55,9 @@ jobs:
7655
exit 0
7756
fi
7857
terminus auth:login --machine-token=$TERMINUS_TOKEN
58+
- run: ./bin/validate-fixture-version.sh
7959
- run: ./bin/behat-prepare.sh
8060
- run: ./bin/behat-test.sh --strict
8161
- run:
8262
command: ./bin/behat-cleanup.sh
8363
when: always
84-
test-phpunit-74:
85-
working_directory: ~/pantheon-systems/pantheon-hud
86-
docker:
87-
- image: circleci/php:7.4-node-browsers
88-
- image: circleci/mariadb:10.3
89-
environment:
90-
- WP_TESTS_DIR: "/tmp/wordpress-tests-lib"
91-
- WP_CORE_DIR: "/tmp/wordpress/"
92-
steps:
93-
- checkout
94-
- restore_cache:
95-
keys:
96-
- test-phpunit-74-dependencies-{{ checksum "composer.json" }}
97-
- run: composer update && composer install -n --prefer-dist
98-
- save_cache:
99-
key: test-phpunit-74-dependencies-{{ checksum "composer.json" }}
100-
paths:
101-
- vendor
102-
- run:
103-
name: "Install Extras"
104-
command: |
105-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
106-
sudo apt-get update
107-
sudo apt-get install subversion
108-
sudo apt-get install -y libmagickwand-dev --no-install-recommends
109-
yes '' | sudo pecl install imagick || true
110-
sudo docker-php-ext-enable imagick
111-
sudo docker-php-ext-install mysqli
112-
sudo apt-get install mariadb-client-10.5
113-
- run:
114-
name: "Run Tests"
115-
command: |
116-
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest
117-
composer phpunit
118-
WP_MULTISITE=1 composer phpunit
119-
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
120-
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 nightly true
121-
composer phpunit
122-
test-phpunit-82:
123-
working_directory: ~/pantheon-systems/pantheon-hud
124-
docker:
125-
- image: cimg/php:8.2.0
126-
- image: circleci/mariadb:10.3
127-
environment:
128-
- WP_TESTS_DIR: "/tmp/wordpress-tests-lib"
129-
- WP_CORE_DIR: "/tmp/wordpress/"
130-
steps:
131-
- checkout
132-
- restore_cache:
133-
keys:
134-
- test-phpunit-82-dependencies-{{ checksum "composer.json" }}
135-
- run: composer install -n --prefer-dist
136-
- save_cache:
137-
key: test-phpunit-82-dependencies-{{ checksum "composer.json" }}
138-
paths:
139-
- vendor
140-
- run:
141-
name: "Install Extras"
142-
command: |
143-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
144-
sudo apt-get update
145-
sudo apt-get install subversion
146-
sudo apt-get install -y libmagickwand-dev --no-install-recommends
147-
yes '' | sudo pecl install imagick || true
148-
sudo docker-php-ext-enable imagick
149-
sudo docker-php-ext-install mysqli
150-
sudo apt-get install mariadb-client-10.6
151-
- run:
152-
name: "Run Tests"
153-
command: |
154-
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest
155-
composer phpunit
156-
WP_MULTISITE=1 composer phpunit
157-
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
158-
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 nightly true
159-
composer phpunit
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build, Tag and Release
2+
on:
3+
push:
4+
branches:
5+
- 'release'
6+
7+
permissions:
8+
pull-requests: write
9+
contents: write
10+
11+
jobs:
12+
tag:
13+
name: Tag and Release
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Build, tag and release
18+
uses: pantheon-systems/plugin-release-actions/build-tag-release@main
19+
with:
20+
gh_token: ${{ github.token }}
21+
generate_release_notes: "true"
22+
draft: "true"

.github/workflows/lint-test.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Lint & Test
2+
on:
3+
schedule:
4+
- cron: "0 0 * * *"
5+
push:
6+
branches:
7+
- '**'
8+
jobs:
9+
lint:
10+
name: Lint
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Install Composer dependencies
15+
run: composer install --no-interaction --prefer-dist
16+
- name: Run PHP Lint
17+
run: composer phpcs
18+
wporg-validation:
19+
name: WP.org Plugin Validation
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: pantheon-systems/action-wporg-validator@1.0.0
23+
with:
24+
type: 'plugin'
25+
validate-readme-spacing:
26+
name: Validate README Spacing
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v3
31+
- uses: pantheon-systems/validate-readme-spacing@v1
32+
php8-compatibility:
33+
name: PHP 8.x Compatibility
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v3
38+
- name: PHP Compatibility
39+
uses: pantheon-systems/phpcompatibility-action@dev
40+
with:
41+
test-versions: 8.0-
42+
paths: ${{ github.workspace }}/*.php ${{ github.workspace }}/inc/*.php
43+
test-phpunit-74:
44+
needs: lint
45+
runs-on: ubuntu-latest
46+
services:
47+
mariadb:
48+
image: mariadb:10.5
49+
name: PHP 7.4 Unit Tests
50+
steps:
51+
- uses: actions/checkout@v3
52+
- name: Setup PHP 7.4
53+
uses: shivammathur/setup-php@v2
54+
with:
55+
php-version: 7.4
56+
extensions: mysqli, zip, imagick
57+
- name: Start MySQL Service
58+
run: sudo systemctl start mysql
59+
- name: Cache dependencies
60+
uses: actions/cache@v3
61+
with:
62+
path: ~/vendor
63+
key: test-phpunit-dependencies-${{ hashFiles('composer.json') }}
64+
restore-keys: test-phpunit-dependencies-${{ hashFiles('composer.json') }}
65+
- name: Install Composer dependencies
66+
run: |
67+
composer update && composer install
68+
- name: Run PHP linting
69+
run: composer phplint
70+
- name: Run PHPUnit
71+
run: bash ./bin/phpunit-test.sh
72+
test-phpunit-83:
73+
needs: lint
74+
runs-on: ubuntu-latest
75+
services:
76+
mariadb:
77+
image: mariadb:10.6
78+
name: PHP 8.3 Unit Tests
79+
steps:
80+
- uses: actions/checkout@v3
81+
- name: Setup PHP 8.3
82+
uses: shivammathur/setup-php@v2
83+
with:
84+
php-version: 8.3
85+
extensions: mysqli, zip, imagick
86+
- name: Start MySQL Service
87+
run: sudo systemctl start mysql
88+
- name: Cache dependencies
89+
uses: actions/cache@v3
90+
with:
91+
path: ~/vendor
92+
key: test-phpunit-dependencies-${{ hashFiles('composer.json') }}
93+
restore-keys: test-phpunit-dependencies-${{ hashFiles('composer.json') }}
94+
- name: Install Composer dependencies
95+
run: composer install
96+
- name: Run PHP linting
97+
run: composer phplint
98+
- name: Run PHPUnit
99+
run: bash ./bin/phpunit-test.sh

.github/workflows/tested-up-to.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Validate Plugin "Tested Up To" Version
2+
on:
3+
schedule:
4+
- cron: '0 0 * * 0'
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
9+
jobs:
10+
validate-wp-version:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Validate Plugin Tested Up To Version
15+
uses: jazzsequence/action-validate-plugin-version@v1
16+
with:
17+
filenames: 'readme.txt,README.md'
18+
branch: 'main'

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
binding.*
33
node_modules/
44
vendor/
5+
bin/helpers.sh
6+
bin/install-local-tests.sh
7+
bin/install-wp-tests.sh
8+
bin/phpunit-test.sh

CODEOWNERS

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
# Code owners. See:
2-
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
3-
4-
* @pantheon-systems/cms-ecosystem
1+
* @pantheon-systems/site-experience

CONTRIBUTING.md

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@ Please feel free to file issues there. Pull requests are also welcome!
88

99
## Workflow
1010

11-
The `develop` branch is the development branch which means it contains the next version to be released. `master` contains the corresponding stable development version. Always work on the `develop` branch and open up PRs against `develop`.
11+
The `main` branch is the development branch which means it contains the next version to be released. `release` contains the corresponding stable development version. Always work on the `main` branch and open up PRs against `main`.
12+
13+
We prefer to squash commits (i.e. avoid merge PRs) from a feature branch into `main` when merging, and to include the PR # in the commit message. PRs to `main` should also include any relevent updates to the changelog in readme.txt. For example, if a feature constitutes a minor or major version bump, that version update should be discussed and made as part of approving and merging the feature into `main`.
14+
15+
`main` should be stable and usable, though possibly a few commits ahead of the public release on wp.org.
16+
17+
The `release` branch matches the latest stable release deployed to [wp.org](wp.org).
1218

1319
## Testing
1420

1521
You may notice there are three sets of tests running:
1622

17-
* [PHPCS](https://github.com/squizlabs/PHP_CodeSniffer) to detect violations of `wp-coding-standards/wpcs` coding standards.
23+
* [PHPCS](https://github.com/squizlabs/PHP_CodeSniffer) to detect violations of [Pantheon WP Coding Standards](https://github.com/pantheon-systems/Pantheon-WP-Coding-Standards).
1824
* [PHPUnit](https://phpunit.de/) test suite.
1925
* [Behat](http://behat.org/) test suite against a Pantheon site, to ensure the plugin's compatibility with the Pantheon platform.
2026

@@ -28,13 +34,24 @@ Note that dependencies are installed via Composer and the `vendor` directory is
2834

2935
## Release Process
3036

31-
1. Starting from `develop`, cut a release branch named `release_X.Y.Z` containing your changes.
32-
1. Update plugin version in `package.json`, `README.md`, `readme.txt`, and `pantheon-hud.php`.
33-
1. Update the Changelog with the latest changes.
34-
1. Create a PR against the `master` branch.
35-
1. After all tests pass and you have received approval from a CODEOWNER (including resolving any merge conflicts), merge the PR into `master`.
36-
1. Pull `master` locally, create a new tag, and push up.
37+
1. From `main`, checkout a new branch `release_X.Y.Z`.
38+
1. Make a release commit:
39+
* Drop the `-dev` from the version number in `package.json`, `README.md`, `readme.txt`, and `pantheon-hud.php`.
40+
* Update the "X.Y.Z-dev" heading in the changelog to the new version number with the date
41+
* Commit these changes with the message `Release X.Y.Z`
42+
* Push the release branch up.
43+
1. Open a Pull Request to merge `release_X.Y.Z` into `release`. Your PR should consist of all commits to `main` since the last release, and one commit to update the version number. The PR name should also be `Release X.Y.Z`.
44+
1. After all tests pass and you have received approval from a CODEOWNER (including resolving any merge conflicts), merge the PR into `release`. Use a "merge" commit, do no not rebase or squash.
45+
1. Pull `release` locally, create a new tag, and push up.
3746
1. Confirm that the necessary assets are present in the newly created tag, and test on a WP install if desired.
38-
1. Create a [new release](https://github.com/pantheon-systems/pantheon-hud/releases/new), naming the release with the new version number, and targeting the tag created in the previous step. Paste the release changelog from `CHANGELOG.md` into the body of the release and include a link to the closed issues if applicable.
39-
1. Wait for the [_Release pantheon-hud plugin to wp.org_ action](https://github.com/pantheon-systems/pantheon-hud/actions/workflows/wordpress-plugin-deploy.yml) to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
40-
1. Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/pantheon-hud/. This may take a few minutes.
47+
1. Create a [new release](https://github.com/pantheon-systems/pantheon-hud/releases/new) using the tag created in the previous steps, naming the release with the new version number, and targeting the tag created in the previous step. Paste the release changelog from the `Changelog` section of [the readme](readme.txt) into the body of the release, including the links to the closed issues if applicable.
48+
1. Wait for the [_Release pantheon-hud plugin to wp.org_ action](https://github.com/pantheon-systems/pantheon-hud/actions/workflows/wordpress-plugin-deploy.yml) to finish deploying to the WordPress.org plugin repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
49+
1. Check WordPress.org: Ensure that the changes are live on [the plugin repository](https://wordpress.org/plugins/pantheon-hud/). This may take a few minutes.
50+
1. Following the release, prepare the next dev version with the following steps:
51+
* `git checkout develop`
52+
* `git rebase release`
53+
* Update the version number in all locations, incrementing the version by one patch version, and add the `-dev` flag (e.g. after releasing `1.2.3`, the new verison will be `1.2.4-dev`)
54+
* Add a new `** X.Y.Z-dev **` heading to the changelog where `X.Y.Z-dev` is the new patch version.
55+
* `git add -A .`
56+
* `git commit -m "Prepare X.Y.X-dev"`
57+
* `git push origin develop`

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = function( grunt ) {
1212
'README.md': 'readme.txt'
1313
},
1414
options: {
15-
screenshot_url: 'https://raw.githubusercontent.com/pantheon-systems/pantheon-hud/master/{screenshot}.png',
15+
screenshot_url: 'https://raw.githubusercontent.com/pantheon-systems/pantheon-hud/main/{screenshot}.png',
1616
},
1717
},
1818
},

README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
# Pantheon HUD #
2-
**Contributors:** [getpantheon](https://profiles.wordpress.org/getpantheon/), [danielbachhuber](https://profiles.wordpress.org/danielbachhuber/), [jspellman](https://profiles.wordpress.org/jspellman/), [jazzs3quence](https://profiles.wordpress.org/jazzs3quence)
3-
**Tags:** Pantheon, hosting
2+
**Contributors:** [getpantheon](https://profiles.wordpress.org/getpantheon/), [danielbachhuber](https://profiles.wordpress.org/danielbachhuber/), [jspellman](https://profiles.wordpress.org/jspellman/), [jazzs3quence](https://profiles.wordpress.org/jazzs3quence), [pwtyler](https://profiles.wordpress.org/pwtyler)
3+
**Tags:** Pantheon, hosting, environment-indicator
44
**Requires at least:** 4.9
5-
**Tested up to:** 6.2
6-
**Stable tag:** 0.4.3
5+
**Tested up to:** 6.7.1
6+
**Stable tag:** 0.4.4
77
**License:** GPLv2 or later
88
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
99

1010
A heads-up display into your Pantheon environment.
1111

1212
## Description ##
1313

14-
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/pantheon-systems/pantheon-hud/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/pantheon-systems/pantheon-hud/tree/master)
14+
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/pantheon-systems/pantheon-hud/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/pantheon-systems/pantheon-hud/tree/main)
15+
[![Lint & Test](https://github.com/pantheon-systems/pantheon-hud/actions/workflows/lint-test.yml/badge.svg)](https://github.com/pantheon-systems/pantheon-hud/actions/workflows/lint-test.yml)
1516
[![Actively Maintained](https://img.shields.io/badge/Pantheon-Actively_Maintained-yellow?logo=pantheon&color=FFDC28)](https://docs.pantheon.io/oss-support-levels#actively-maintained-support)
1617

1718
This plugin provides situational awareness of the Pantheon plaform from within your WordPress dashboard. It's helpful to be reminded what environment you're in, as well as providing quick links to get back to Pantheon's dashboard, or to interface with your WordPress installation via the command line.
@@ -35,13 +36,19 @@ By default, the Pantheon HUD appears for logged-in users with the `manage_option
3536
## Screenshots ##
3637

3738
### 1. Pantheon HUD is present in the WordPress toolbar. On hover, it displays environmental details and helpful links. ###
38-
![Pantheon HUD is present in the WordPress toolbar. On hover, it displays environmental details and helpful links.](https://raw.githubusercontent.com/pantheon-systems/pantheon-hud/master/screenshot-1.png)
39+
![Pantheon HUD is present in the WordPress toolbar. On hover, it displays environmental details and helpful links.](https://raw.githubusercontent.com/pantheon-systems/pantheon-hud/main/screenshot-1.png)
3940

4041

4142
## Changelog ##
42-
### 0.4.3 (April 6, 2023) ###
43-
* Update Composer dependencies [[#116](https://github.com/pantheon-systems/pantheon-hud/pull/116)] [[#118](https://github.com/pantheon-systems/pantheon-hud/pull/118)]
44-
* Update Actively Maintained anchor link [[#102](https://github.com/pantheon-systems/pantheon-hud/pull/102)]
43+
### 0.4.4 (December 6, 2024 ###
44+
* Fix admin bar item layout issue [[#145](https://github.com/pantheon-systems/pantheon-hud/pull/145)] props @cbirdsong and @westonruter
45+
* Update CONTRIBUTING.md [[#123](https://github.com/pantheon-systems/pantheon-hud/pull/123)]
46+
* Added "environment-indicator" to tags [[#128](https://github.com/pantheon-systems/pantheon-hud/pull/128)]
47+
* Updates Pantheon WP Coding Standards to 2.0 [[#131](https://github.com/pantheon-systems/pantheon-hud/pull/131)]
48+
49+
### 0.4.3 (April 6, 2023) ###
50+
* Update Composer dependencies [[#116](https://github.com/pantheon-systems/pantheon-hud/pull/116)] [[#118](https://github.com/pantheon-systems/pantheon-hud/pull/118)]
51+
* Update Actively Maintained anchor link [[#102](https://github.com/pantheon-systems/pantheon-hud/pull/102)]
4552
* Update Tested up to version.
4653

4754
### 0.4.2 (January 23, 2023) ###

0 commit comments

Comments
 (0)