refactor(ci): auto-release uses CLI tools (#45) #46

Merged
jmiller merged 22 commits from dev into main 2026-05-22 02:55:22 +00:00

22 Commits

Author SHA1 Message Date
Jonathan Miller 9b456da7e5 refactor(ci): auto-release uses CLI tools for 6 major steps (#45)
Replace inline bash with moko-platform CLI calls:
- manifest_read.php for platform detection
- version_read.php + version_bump.php for version management
- badge_update.php for README badges
- updates_xml_build.php for Joomla update stream
- release_cascade.php for pre-release cleanup

Reduces auto-release.yml from 1006 to 762 lines (-244).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 21:54:51 -05:00
jmiller 60e53d5e6e Merge pull request 'chore: cascade main → dev (12d27e7) [skip ci]' (#42) from main into dev
chore: cascade main → dev [skip ci]
2026-05-22 02:48:49 +00:00
Jonathan Miller 3c11006aae refactor(ci): pre-release uses CLI tools for detect/version/build
Replace inline bash with moko-platform CLI calls:
- manifest_read.php --github-output for platform detection
- version_bump.php for patch version increment
- version_set_platform.php for manifest version update
- joomla_build.php for type-aware package building
- updates_xml_sync.php for cross-branch sync

Reduces inline bash from ~160 lines to ~85 lines.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 21:48:12 -05:00
jmiller 4b9a682e53 Merge pull request 'chore: cascade main → dev (89007ab) [skip ci]' (#40) from main into dev
chore: cascade main → dev [skip ci]
2026-05-22 02:39:22 +00:00
Jonathan Miller 4dfbcf4fd2 feat(cli): add updates_xml_sync.php — replaces inline workflow sync (#34)
New CLI tool syncs updates.xml to target branches via Gitea API.
Pre-release workflow now calls the CLI instead of inline bash.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 21:38:54 -05:00
Jonathan Miller c6da98289b chore: rename MokoStandards to moko-platform in CLI headers
Update DEFGROUP and INGROUP fields across all CLI scripts
to reflect the repo rename from MokoStandards to moko-platform.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 21:35:29 -05:00
jmiller b7a07d2e08 Merge pull request 'chore: cascade main → dev (93b2e87) [skip ci]' (#38) from main into dev
chore: cascade main → dev [skip ci]
2026-05-22 02:35:05 +00:00
Jonathan Miller 03801ff925 fix(ci): sync updates.xml via API instead of git checkout (#34)
The git checkout approach fails when dev and main have diverged.
Use Gitea Contents API (PUT) to update updates.xml on target branches
directly, matching the pattern already used in auto-release.yml.

Fixes #34

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 21:34:18 -05:00
jmiller 7f9c3f2ab0 Merge pull request 'chore: cascade main → dev (5b9d258) [skip ci]' (#36) from main into dev
chore: cascade main → dev [skip ci]
2026-05-22 02:28:23 +00:00
Jonathan Miller 3d1af376a0 feat(cli): add release automation CLI scripts
New CLI scripts to replace inline bash in CI workflows:
- changelog_promote.php: promote [Unreleased] to versioned entry
- badge_update.php: update [VERSION: XX.XX.XX] in markdown files
- updates_xml_build.php: generate Joomla updates.xml with stability suffixes
- package_build.php: build ZIP/tar.gz install packages
- release_manage.php: create/update/delete Gitea releases + upload assets
- release_cascade.php: delete lesser pre-release channels

Updated version_set_platform.php with --stability flag to append
-dev/-alpha/-beta/-rc suffixes to non-stable versions.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 21:25:35 -05:00
jmiller ab51b15dfb Merge pull request 'chore: cascade main → dev (a706a2c) [skip ci]' (#33) from main into dev
chore: cascade main → dev [skip ci]
2026-05-21 22:19:55 +00:00
Jonathan Miller d37b547e87 refactor: manifest_read.php uses manifest.xml as primary lookup
Priority order: manifest.xml > .manifest.xml (legacy) > .moko-platform (v4)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 17:18:03 -05:00
jmiller c33106de1c Merge pull request 'chore: cascade main → dev (46d9af0) [skip ci]' (#31) from main into dev
chore: cascade main → dev [skip ci]
2026-05-21 22:15:57 +00:00
Jonathan Miller 6a29fbd99e refactor: rename GiteaAdapter to MokoGiteaAdapter
Rename class, file, and all references across the codebase to align
with the moko-platform naming convention.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 17:14:29 -05:00
jmiller f09a855f0b Merge pull request 'chore: cascade main → dev (8095ea6) [skip ci]' (#29) from main into dev
chore: cascade main → dev [skip ci]
2026-05-21 21:55:27 +00:00
Jonathan Miller a09d880c0a refactor: rename .gitea/ to .mokogitea/ in all PHP code and sync engine
Update GiteaAdapter.getWorkflowDir() and getMetadataDir() to return
.mokogitea paths. All 24 PHP files referencing .gitea/ updated.
Bulk sync will now push workflows to .mokogitea/workflows/ in
governed repos.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 16:54:55 -05:00
jmiller a84683df11 Merge pull request 'chore: cascade main → dev (14763e3) [skip ci]' (#27) from main into dev
chore: cascade main → dev [skip ci]
2026-05-21 21:44:09 +00:00
Jonathan Miller e19ca4d7a9 feat(ci): type-aware Joomla build via PHP API (#20, #21)
Add cli/joomla_build.php — standalone build tool that detects all
Joomla extension types from the XML manifest and builds accordingly:
  - plugin, module, component, template, library, file: flat ZIP
  - package: nested ZIPs for each sub-extension in packages/

Update both workflows to call joomla_build.php via the moko-platform
PHP API instead of inlining bash build logic.

Also extends joomla_release.php with:
  - typePrefix() for correct naming (plg_, mod_, com_, tpl_, pkg_, lib_)
  - buildPackageZip() for multi-extension package assembly
  - copyDir() helper

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 16:43:07 -05:00
jmiller de2c17e851 Merge pull request 'chore: cascade main → dev (e73731a) [skip ci]' (#25) from main into dev
chore: cascade main → dev [skip ci]
2026-05-21 21:19:18 +00:00
Jonathan Miller eb3e2af1ff refactor: rename all MokoStandards-API references to moko-platform
Bulk rename across all workflows, issue templates, and configs:
- Clone URL: MokoStandards-API.git → moko-platform.git
- Local path: /tmp/mokostandards-api → /tmp/moko-platform-api
- DEFGROUP/INGROUP: MokoStandards.* → moko-platform.*
- Step names and comments updated
- REPO URLs updated to MokoConsulting/moko-platform

EXCLUDE lists retain old repo names for backward compatibility
during migration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 16:18:33 -05:00
jmiller c7faf96108 Merge pull request 'chore: cascade main → dev (a27afb4) [skip ci]' (#23) from main into dev
chore: cascade main → dev [skip ci]
2026-05-21 21:07:46 +00:00
Jonathan Miller f2d1695ac3 fix(ci): pipefail and rsync issues in release workflows (#20, #21)
- Add || true to all find|grep|head pipelines to prevent grep exit-code 1
  from killing steps under bash -e -o pipefail
- Replace rsync with cp -a in pre-release Build Package step since rsync
  is not always available in runner containers (exit 127)

Fixes #20, Fixes #21

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 16:05:54 -05:00