Repository navigation
Zip folder matches WordPress.org slug + one-copy guard + folder lock CI - #8
Merged
Merged
Conversation
Member
Author
Re-proved: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
bin/build-release.sh:slug=activity-link-preview-for-buddypress(keptSLUG="$slug"so the rest of the script is unchanged), so the zip isdist/activity-link-preview-for-buddypress-<version>.zipwith the folderactivity-link-preview-for-buddypress/(the WordPress.org slug). Every entry is now deflated (python zipfile instead ofzip -rqX) and the standard WordPress.org folder lock block runs right after the zip is written. The required-file check now nameslanguages/buddypress-activity-link-preview.potliterally (the POT is named after the text domain, not the folder). Version, docs-lint and leak gates are unchanged.bp-activity-link-preview.php: one-copy guard (ACTIVITY_LINK_PREVIEW_FOR_BUDDYPRESS_LOADED) after the ABSPATH check, and every top-level function wrapped infunction_exists(). No behaviour change otherwise; the diff is mostly re-indent, so review with "Hide whitespace"..github/workflows/wporg-folder-lock.yml: the standard folder-lock CI (identical in every Wbcom .org plugin).ci.ymlis untouched.Why
The GitHub/store zip used the folder
buddypress-activity-link-preview/while WordPress.org installsactivity-link-preview-for-buddypress/. Two folder names mean two copies on one site, and the second copy fatals withCannot redeclare bp_activity_link_preview_load_textdomain().Proof
dupe-load-test.shon the base branch: FAIL both orders (Cannot redeclare bp_activity_link_preview_load_textdomain()). On this branch: PASS both orders.bash bin/build-release.sh: zip built (15 files), lock passed.bin/local-ci.sh: LOCAL CI PASSED (WPCS 0 errors).svn ls -R https://plugins.svn.wordpress.org/activity-link-preview-for-buddypress/trunk(1.7.7): identical, 15 files each.OK: zip folder 'activity-link-preview-for-buddypress' matches WordPress.org (bp-activity-link-preview.php).php -lof the main file under PHP 8.1: no syntax errors.Follow-up commit
The lock block is now bracketed by
set +o pipefail/set -o pipefail. Underpipefailitsunzip | headandunzip | grep -qpipes can exit 141 (SIGPIPE) and stop the build silently; this was reproduced 4 runs out of 5 on a 157-entry zip in another plugin. The block text itself is unchanged and the build was rerun green after the change.