refactor: simplify version extraction - derive filename from manifest version #191

Open
opened 2026-05-26 23:32:21 +00:00 by jmiller · 1 comment
Owner

Problem

The update-server and pre-release workflows have complex version logic:

  1. Read version from manifest
  2. Strip suffix
  3. Bump patch
  4. Re-apply suffix based on branch
  5. Compute DISPLAY_VERSION separately
  6. Build filename from DISPLAY_VERSION

This leads to mismatches where the manifest version and the ZIP filename diverge (e.g. manifest says 01.02.14 but filename should be 01.02.14-dev.zip).

Proposed Fix

Since the manifest version now includes the full suffix (e.g. 01.02.14-dev), simplify to:

  1. Read version directly from manifest as-is
  2. Derive filename: element + version (no separate suffix logic)
  3. version_bump.php should preserve the existing suffix when bumping

This eliminates the separate DISPLAY_VERSION variable and the branch-to-suffix mapping logic.

Affected files

  • update-server.yml (Generate updates.xml entry step)
  • pre-release.yml (Resolve metadata step)
  • auto-release.yml (if applicable)
  • version_bump.php CLI (should preserve suffix)
## Problem The update-server and pre-release workflows have complex version logic: 1. Read version from manifest 2. Strip suffix 3. Bump patch 4. Re-apply suffix based on branch 5. Compute DISPLAY_VERSION separately 6. Build filename from DISPLAY_VERSION This leads to mismatches where the manifest version and the ZIP filename diverge (e.g. manifest says 01.02.14 but filename should be 01.02.14-dev.zip). ## Proposed Fix Since the manifest version now includes the full suffix (e.g. 01.02.14-dev), simplify to: 1. Read version directly from manifest as-is 2. Derive filename: element + version (no separate suffix logic) 3. version_bump.php should preserve the existing suffix when bumping This eliminates the separate DISPLAY_VERSION variable and the branch-to-suffix mapping logic. ## Affected files - update-server.yml (Generate updates.xml entry step) - pre-release.yml (Resolve metadata step) - auto-release.yml (if applicable) - version_bump.php CLI (should preserve suffix)
Author
Owner

Branch created: feature/191-refactor-simplify-version-extraction-der

git fetch origin
git checkout feature/191-refactor-simplify-version-extraction-der
Branch created: [`feature/191-refactor-simplify-version-extraction-der`](https://git.mokoconsulting.tech/MokoConsulting/moko-platform/src/branch/feature/191-refactor-simplify-version-extraction-der) ```bash git fetch origin git checkout feature/191-refactor-simplify-version-extraction-der ```
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#191