Add a sh script to generate rc and update the composer.json file#1091
Merged
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Coverage variation | ✅ +0.00% coverage variation (-0.10%) |
| Diff coverage | ✅ ∅ diff coverage (50.00%) |
Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (fd336fc) 18504 341 1.84% Head commit (ffd40dd) 18504 (+0) 341 (+0) 1.84% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>
Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#1091) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Miraeld
approved these changes
Jun 18, 2026
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.
Description
Add local RC candidate generation tooling to streamline the release QA workflow.
This PR introduces a
bin/build-zip.shscript that allows developers to generate a distribution ZIP locally — identical to what thedeploy-tag.ymlCI produces for SVN — without triggering a full release. It also promoteswoocommerce/action-schedulerfrom a dev dependency to a production dependency, and ships an updated set of minified JS assets rebuilt with the correct toolchain.Type of change
Detailed scenario
What was tested
./bin/build-zip.sh imagify-x.x.x-rc1.zipfrom the repo root on a local environment with Composer and Node available.generatedpackages/matches the file layout produced by the CI pipeline (applies.distignore, strips dev-only paths such as/Tests,/bin,/.github).generatedpackages/is excluded from version control via the new.gitignoreentry.composer installis re-run at the end of the script).woocommerce/action-scheduler ^3.4is correctly declared underrequireand no longer listed underrequire-dev.How to test
generatedpackages/imagify-test.zip.imagify/directory is present at the root of the archive.Tests/,bin/,.github/,composer.json, etc.) are absent.assets/js/.generatedpackages/does not appear ingit status.Affected Features & Quality Assurance Scope
woocommerce/action-schedulermoving fromrequire-devtorequireensures it is included in the production vendor directory; any code path that depends on it at runtime will now work correctly in production builds.Technical description
Documentation
bin/build-zip.shThe script follows the same steps as the
deploy-tag.ymlCI workflow:strauss.pharonce (cached inbin/) if not already present.composer install -o --no-devto produce a production vendor directory (Strauss namespacing is applied by the Composer post-install hook).npm install && npm run buildto compile front-end assets.rsync..distignoreand removes every listed path from the temp copy.generatedpackages/<zip-name>.composer installwithout--no-dev.composer.jsonwoocommerce/action-scheduler ^3.4is moved fromrequire-devtorequire. This was likely misplaced — Action Scheduler is a runtime dependency (background processing), not a tooling dependency..gitignore/generatedpackagesis added so that the output directory created by the script is never accidentally committed.assets/js/*.min.jsAll minified JS files have been rebuilt. The observable diff in
admin.min.jsshows an arrow-function IIFE ((a,i,e) => {...}) replaced with a standard function expression (function(a,i,e){...}), consistent with a change in the Babel/build target configuration to improve broader browser compatibility.New dependencies
None at the runtime level beyond what was already in use.
woocommerce/action-schedulerwas already present in the project; this change solely corrects its placement incomposer.json.The script requires
strauss.phar(downloaded automatically on first run),composer,npm,rsync, andzipto be available on the developer's machine.Risks
generatedpackages/: mitigated by the new.gitignoreentry.deploy-tag.ymlshould be reflected inbuild-zip.shas well. Consider adding a comment in both files referencing each other.action-schedulerin production vendor: low risk — the library is already used in production. Moving it torequireensures it ships in the ZIP; previously it could have been silently absent in production builds.Mandatory Checklist
Code validation
Code style
Unticked items justification
"I implemented built-in tests": the script is a standalone shell utility for local developer use. Automated tests for a packaging script would add complexity without meaningful safety gains; the build output is validated manually by inspecting the ZIP contents.
Additional Checks