cli: release_verify.php - post-release artifact verification #56

Closed
opened 2026-05-23 22:53:57 +00:00 by jmiller · 1 comment
Owner

Summary

Add a CLI tool that verifies a built release artifact after upload.

Checks to perform

  1. Download - Fetch ZIP from the release URL, confirm HTTP 200
  2. Unzip - Extract and validate ZIP integrity
  3. Manifest version - XML manifest <version> matches release version (Joomla)
  4. SHA256 vs updates.xml - Downloaded file hash matches <sha256> in updates.xml
  5. Disallowed files - Reject .claude, .env, TODO.md, node_modules, .git
  6. Non-vendor .min files - Warn if minified files exist outside vendor/

CLI interface

php cli/release_verify.php   --zip-url "$DOWNLOAD_URL"   --version "$VERSION"   --platform joomla   --updates-xml updates.xml   --output-summary

Workflow integration

- name: "Step 8c: Verify release artifact"
  run: php /tmp/moko-platform-api/cli/release_verify.php     --zip-url "$DOWNLOAD_URL" --version "$VERSION"     --platform "$PLATFORM" --updates-xml updates.xml --output-summary

Context

Currently implemented as 130 lines of inline bash in auto-release.yml Step 8c (reverted). Should be a reusable CLI tool.

## Summary Add a CLI tool that verifies a built release artifact after upload. ## Checks to perform 1. **Download** - Fetch ZIP from the release URL, confirm HTTP 200 2. **Unzip** - Extract and validate ZIP integrity 3. **Manifest version** - XML manifest `<version>` matches release version (Joomla) 4. **SHA256 vs updates.xml** - Downloaded file hash matches `<sha256>` in updates.xml 5. **Disallowed files** - Reject .claude, .env, TODO.md, node_modules, .git 6. **Non-vendor .min files** - Warn if minified files exist outside vendor/ ## CLI interface ```bash php cli/release_verify.php --zip-url "$DOWNLOAD_URL" --version "$VERSION" --platform joomla --updates-xml updates.xml --output-summary ``` ## Workflow integration ```yaml - name: "Step 8c: Verify release artifact" run: php /tmp/moko-platform-api/cli/release_verify.php --zip-url "$DOWNLOAD_URL" --version "$VERSION" --platform "$PLATFORM" --updates-xml updates.xml --output-summary ``` ## Context Currently implemented as 130 lines of inline bash in auto-release.yml Step 8c (reverted). Should be a reusable CLI tool.
Author
Owner

Completed

Implemented in cli/release_verify.php on branch feature/cli-release-tools.

Test proof (MokoOnyx 02.06.00 release ZIP):

| Check | Result | Details |
|-------|--------|--------|
| ZIP exists | PASS | release.zip |
| ZIP extract | PASS | Extracted successfully |
| Manifest version | PASS | 02.06.00 matches release |
| SHA256 vs updates.xml | PASS | b9fcd02716347b7b... |
| Disallowed files | PASS | None found |
| Non-vendor .min files | WARN | 5 file(s) |

Verification: 5 passed, 0 failed, 1 warnings

CLI interface:

php cli/release_verify.php --zip-path FILE --version XX.YY.ZZ --platform joomla --updates-xml updates.xml --output-summary
## Completed Implemented in `cli/release_verify.php` on branch [`feature/cli-release-tools`](https://git.mokoconsulting.tech/MokoConsulting/moko-platform/src/branch/feature/cli-release-tools/cli/release_verify.php). ### Test proof (MokoOnyx 02.06.00 release ZIP): ``` | Check | Result | Details | |-------|--------|--------| | ZIP exists | PASS | release.zip | | ZIP extract | PASS | Extracted successfully | | Manifest version | PASS | 02.06.00 matches release | | SHA256 vs updates.xml | PASS | b9fcd02716347b7b... | | Disallowed files | PASS | None found | | Non-vendor .min files | WARN | 5 file(s) | Verification: 5 passed, 0 failed, 1 warnings ``` ### CLI interface: ```bash php cli/release_verify.php --zip-path FILE --version XX.YY.ZZ --platform joomla --updates-xml updates.xml --output-summary ```
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/moko-platform#56