feat(cli): create version_bump_remote.php for remote branch version bumping #80

Closed
opened 2026-05-24 08:26:53 +00:00 by jmiller · 1 comment
Owner

Summary

Create a new CLI tool version_bump_remote.php that bumps version in manifest XML and CHANGELOG.md on a remote branch via Gitea contents API without requiring a local checkout.

Problem

client-release.yml Step 5 has ~55 lines of inline curl/python that:

  1. Compute next minor version via version_bump.php --minor
  2. GET templateDetails.xml from dev via API
  3. Replace <version> in content
  4. PUT updated content back via API
  5. GET CHANGELOG.md from dev via API
  6. Add Unreleased section header
  7. PUT updated changelog back via API

This is the largest inline block remaining.

Proposed CLI

Usage:
  php version_bump_remote.php --path . --branch dev --bump minor \n    --token TOKEN --api-base URL

Options:
  --path       Repository root (reads current version from manifest)
  --branch     Target branch to bump (e.g. dev)
  --bump       Bump type: patch | minor | major (default: minor)
  --token      Gitea API token
  --api-base   Gitea API base URL for the repo
  --changelog  Also bump CHANGELOG.md (default: true)

Impact

~55 lines to 3 lines. Also benefits all Joomla auto-release workflows.

Affected workflows

  • client-release.yml (Template-Client-WaaS, client-waas-clarksvillefurs)
  • All Joomla auto-release workflows that bump dev after stable release
## Summary Create a new CLI tool `version_bump_remote.php` that bumps version in manifest XML and CHANGELOG.md on a remote branch via Gitea contents API without requiring a local checkout. ## Problem `client-release.yml` Step 5 has ~55 lines of inline curl/python that: 1. Compute next minor version via `version_bump.php --minor` 2. GET `templateDetails.xml` from dev via API 3. Replace `<version>` in content 4. PUT updated content back via API 5. GET `CHANGELOG.md` from dev via API 6. Add Unreleased section header 7. PUT updated changelog back via API This is the largest inline block remaining. ## Proposed CLI ``` Usage: php version_bump_remote.php --path . --branch dev --bump minor \n --token TOKEN --api-base URL Options: --path Repository root (reads current version from manifest) --branch Target branch to bump (e.g. dev) --bump Bump type: patch | minor | major (default: minor) --token Gitea API token --api-base Gitea API base URL for the repo --changelog Also bump CHANGELOG.md (default: true) ``` ## Impact ~55 lines to 3 lines. Also benefits all Joomla auto-release workflows. ## Affected workflows - `client-release.yml` (Template-Client-WaaS, client-waas-clarksvillefurs) - All Joomla auto-release workflows that bump dev after stable release
Author
Owner

Test Proof

Run: #10354
Result: All steps passed

Step 5 replaced ~55 lines of inline curl/python with a single call to version_bump_remote.php --branch dev --bump minor.

Implemented in client-waas-clarksvillefurs and Template-Client-WaaS.

## Test Proof **Run:** [#10354](https://git.mokoconsulting.tech/ClarksvilleFurs/client-waas-clarksvillefurs/actions/runs/10354) **Result:** All steps passed Step 5 replaced ~55 lines of inline curl/python with a single call to version_bump_remote.php --branch dev --bump minor. Implemented in client-waas-clarksvillefurs and Template-Client-WaaS.
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#80