From 327d4b4e857358e37cfed50b3242cceb2fee9afd Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Thu, 28 May 2026 15:40:16 -0500 Subject: [PATCH] fix: strip existing suffix before appending stability in all workflows version_read may return a version with -dev suffix from manifest.xml. Without stripping first, appending the suffix again produces double suffixes like 02.17.00-dev-dev. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- .mokogitea/workflows/auto-release.yml | 2 ++ .mokogitea/workflows/update-server.yml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.mokogitea/workflows/auto-release.yml b/.mokogitea/workflows/auto-release.yml index 757bfb4..72ce95a 100644 --- a/.mokogitea/workflows/auto-release.yml +++ b/.mokogitea/workflows/auto-release.yml @@ -201,6 +201,8 @@ jobs: MOKO_API="/tmp/moko-platform-api/cli" php ${MOKO_API}/version_bump.php --path . --minor 2>&1 || true VERSION=$(php ${MOKO_API}/version_read.php --path .) + # Strip any pre-release suffix — stable releases have no suffix + VERSION=$(echo "$VERSION" | sed 's/-\(dev\|alpha\|beta\|rc\)$//') echo "version=${VERSION}" >> "$GITHUB_OUTPUT" echo "Bumped to: ${VERSION}" diff --git a/.mokogitea/workflows/update-server.yml b/.mokogitea/workflows/update-server.yml index 0e0a8e5..339d3f5 100644 --- a/.mokogitea/workflows/update-server.yml +++ b/.mokogitea/workflows/update-server.yml @@ -114,6 +114,9 @@ jobs: VERSION=$(php ${MOKO_CLI}/version_read.php --path . 2>/dev/null || echo "0.0.0") + # Strip any existing suffix before applying stability + VERSION=$(echo "$VERSION" | sed 's/-\(dev\|alpha\|beta\|rc\)$//') + # Determine stability from branch or manual input if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then STABILITY="${{ inputs.stability }}"