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

Add generate-pending-release-diffs command #1227

Merged
merged 3 commits into from
May 22, 2024

Conversation

westonruter
Copy link
Member

To ensure that we're only including the expected files when we do releases, it's important to review a diff of the changes for each plugin prior to doing a release. This PR introduces a generate-pending-release-diffs command to facilitate this.

See example output on #1225 (comment)

You can invoke via:

npm run generate-pending-release-diffs --silent > overview.md

And then the contents can be pasted into a GitHub comment for review. Note the --silent arg to npm run omits this output:

> generate-pending-release-diffs
> bin/generate-pending-release-diffs.sh


> build:plugin:performance-lab
> rm -rf build/performance-lab && mkdir -p build/performance-lab && git archive HEAD | tar -x -C build/performance-lab


> build-plugins
> npm-run-all 'build:plugin:!(performance-lab)'


> build:plugin:auto-sizes
> webpack --mode production --env plugin=auto-sizes

Or you can just directly invoke ./bin/generate-pending-release-diffs.sh.

On MacOS, you can put the output directly onto the clipboard via:

./bin/generate-pending-release-diffs.sh | pbcopy

On Linux, there are equivalent commands.

@westonruter westonruter added [Type] Enhancement A suggestion for improvement of an existing feature no milestone PRs that do not have a defined milestone for release skip changelog PRs that should not be mentioned in changelogs labels May 18, 2024
Copy link

github-actions bot commented May 18, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: westonruter <westonruter@git.wordpress.org>
Co-authored-by: thelovekesh <thelovekesh@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@westonruter westonruter added Infrastructure Issues for the overall performance plugin infrastructure [Type] Enhancement A suggestion for improvement of an existing feature and removed [Type] Enhancement A suggestion for improvement of an existing feature Infrastructure Issues for the overall performance plugin infrastructure labels May 18, 2024
@westonruter westonruter mentioned this pull request May 18, 2024
7 tasks
@westonruter westonruter added this to the performance-lab n.e.x.t milestone May 20, 2024
@thelovekesh
Copy link
Member

It would have been required as part of #1061. Great that it has been added by @westonruter 🎉

@westonruter
Copy link
Member Author

Current output:

auto-sizes

svn status:

svn diff

dominant-color-images

svn status:

M       class-dominant-color-image-editor-imagick.php
svn diff
Index: class-dominant-color-image-editor-imagick.php
===================================================================
--- class-dominant-color-image-editor-imagick.php	(revision 3091115)
+++ class-dominant-color-image-editor-imagick.php	(working copy)
@@ -32,7 +32,6 @@
 		}
 
 		try {
-			// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
 			// The logic here is resize the image to 1x1 pixel, then get the color of that pixel.
 			$this->image->resizeImage( 1, 1, Imagick::FILTER_LANCZOS, 1 );
 			$pixel = $this->image->getImagePixelColor( 0, 0 );

embed-optimizer

svn status:

svn diff

optimization-detective

svn status:

svn diff

performance-lab

svn status:

!       LICENSE
svn diff

speculation-rules

svn status:

M       helper.php
M       load.php
svn diff
Index: helper.php
===================================================================
--- helper.php	(revision 3091115)
+++ helper.php	(working copy)
@@ -103,7 +103,7 @@
 					// Also exclude rel=nofollow links, as plugins like WooCommerce use that on their add-to-cart links.
 					array(
 						'not' => array(
-							'selector_matches' => 'a[rel=nofollow]',
+							'selector_matches' => 'a[rel~="nofollow"]',
 						),
 					),
 				),
Index: load.php
===================================================================
--- load.php	(revision 3091115)
+++ load.php	(working copy)
@@ -5,7 +5,7 @@
  * Description: Enables browsers to speculatively prerender or prefetch pages when hovering over links.
  * Requires at least: 6.4
  * Requires PHP: 7.2
- * Version: 1.3.0
+ * Version: 1.3.1-alpha
  * Author: WordPress Performance Team
  * Author URI: https://make.wordpress.org/performance/
  * License: GPLv2 or later
@@ -65,7 +65,7 @@
 	}
 )(
 	'plsr_pending_plugin_info',
-	'1.3.0',
+	'1.3.1-alpha',
 	static function ( string $version ): void {
 
 		// Define the constant.

webp-uploads

svn status:

svn diff

@westonruter
Copy link
Member Author

@thelovekesh I see the LICENSE file is now missing in the latest performance-lab build here. I suppose that is correct because the file is really meant for the repo and not for the individual plugins, and this file is absent from the other plugins as well.

@westonruter westonruter merged commit e83c2fb into trunk May 22, 2024
13 checks passed
@westonruter westonruter deleted the add/generate-pending-release-diffs-command branch May 22, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no milestone PRs that do not have a defined milestone for release skip changelog PRs that should not be mentioned in changelogs [Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants