From a83eda57981bd2aa9f1ce6708d6e70e330189908 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Thu, 4 Jun 2026 13:25:50 -0500 Subject: [PATCH 1/3] chore: remove build/ directory from tracking Build artifacts are created by CI, not tracked in source. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- build/index.md | 19 -------- build/moko-make | 112 ------------------------------------------------ 2 files changed, 131 deletions(-) delete mode 100644 build/index.md delete mode 100644 build/moko-make diff --git a/build/index.md b/build/index.md deleted file mode 100644 index 46be81f..0000000 --- a/build/index.md +++ /dev/null @@ -1,19 +0,0 @@ -# Build Index: /api/build - -## Purpose - -This folder contains build system management and compilation scripts. - -## Quick Links - -- [README](./README.md) - Build scripts documentation - -## Scripts - -- [moko-make](./moko-make) - Build system wrapper -- [resolve_makefile.py](./resolve_makefile.py) - Makefile resolution - -## Metadata - -- **Document Type:** index -- **Auto-generated:** This file is manually maintained for ignored directory diff --git a/build/moko-make b/build/moko-make deleted file mode 100644 index ff51dc8..0000000 --- a/build/moko-make +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) 2026 Moko Consulting -# SPDX-License-Identifier: GPL-3.0-or-later -# -# Moko Build Wrapper -# Automatically finds and uses appropriate Makefile from MokoStandards - -set -e - -# Colors -COLOR_RESET="\033[0m" -COLOR_GREEN="\033[32m" -COLOR_BLUE="\033[34m" -COLOR_RED="\033[31m" - -# Find MokoStandards root -find_mokostandards() { - # Check environment variable - if [ -n "$MOKOSTANDARDS_ROOT" ] && [ -d "$MOKOSTANDARDS_ROOT/templates/build" ]; then - echo "$MOKOSTANDARDS_ROOT" - return 0 - fi - - # Check adjacent directories - if [ -d "../MokoStandards/templates/build" ]; then - echo "$(cd ../MokoStandards && pwd)" - return 0 - fi - - if [ -d "../../MokoStandards/templates/build" ]; then - echo "$(cd ../../MokoStandards && pwd)" - return 0 - fi - - # Check home directory - if [ -d "$HOME/.mokostandards/templates/build" ]; then - echo "$HOME/.mokostandards" - return 0 - fi - - # Check system location - if [ -d "/opt/mokostandards/templates/build" ]; then - echo "/opt/mokostandards" - return 0 - fi - - return 1 -} - -# Find appropriate Makefile -find_makefile() { - # Check for local Makefile - if [ -f "Makefile" ]; then - echo "Makefile" - return 0 - fi - - # Check for .moko/Makefile - if [ -f ".moko/Makefile" ]; then - echo ".moko/Makefile" - return 0 - fi - - # Find MokoStandards - MOKO_ROOT=$(find_mokostandards) - if [ $? -ne 0 ]; then - echo -e "${COLOR_RED}✗${COLOR_RESET} MokoStandards repository not found" >&2 - echo -e "${COLOR_BLUE}Hint:${COLOR_RESET} Set MOKOSTANDARDS_ROOT or clone adjacent" >&2 - return 1 - fi - - # Detect project type - if [ -d "core/modules" ] && ls core/modules/mod*.class.php >/dev/null 2>&1; then - echo "$MOKO_ROOT/templates/build/dolibarr/Makefile" - return 0 - fi - - # Check for Joomla XML files - shopt -s nullglob # Prevent glob expansion if no matches - for xml in *.xml; do - if [ -f "$xml" ]; then - if grep -q 'type="component"' "$xml" 2>/dev/null; then - echo "$MOKO_ROOT/templates/build/joomla/Makefile.component" - return 0 - elif grep -q 'type="module"' "$xml" 2>/dev/null; then - echo "$MOKO_ROOT/templates/build/joomla/Makefile.module" - return 0 - elif grep -q 'type="plugin"' "$xml" 2>/dev/null; then - echo "$MOKO_ROOT/templates/build/joomla/Makefile.plugin" - return 0 - fi - fi - done - shopt -u nullglob - - echo -e "${COLOR_RED}✗${COLOR_RESET} Could not detect project type" >&2 - return 1 -} - -# Main execution -MAKEFILE=$(find_makefile) -if [ $? -ne 0 ]; then - exit 1 -fi - -# Show which Makefile we're using -if [[ "$MAKEFILE" == *"MokoStandards"* ]] || [[ "$MAKEFILE" == *".mokostandards"* ]]; then - echo -e "${COLOR_BLUE}ℹ${COLOR_RESET} Using MokoStandards template" -fi - -# Run make with the found Makefile -exec make -f "$MAKEFILE" "$@" -- 2.52.0 From 85d863be08c192139ba87117a5d91047527e7df1 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Thu, 4 Jun 2026 16:51:44 -0500 Subject: [PATCH 2/3] fix: pre-release bumps version via CLI (patch for dev, minor for RC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each dev/alpha/beta pre-release now bumps patch so Joomla sees a higher version and offers the update. RC bumps minor to consolidate dev patches into a clean release version. Uses version_bump.php from CLI — no inline shell math in workflows. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- .mokogitea/workflows/pre-release.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.mokogitea/workflows/pre-release.yml b/.mokogitea/workflows/pre-release.yml index ff818ba..62e08c0 100644 --- a/.mokogitea/workflows/pre-release.yml +++ b/.mokogitea/workflows/pre-release.yml @@ -85,13 +85,20 @@ jobs: release-candidate) TAG="release-candidate" ;; esac - # Set stability suffix, bump preserves it, fix consistency + # Bump version: patch for dev/alpha/beta, minor for RC + case "$STABILITY" in + release-candidate) php ${MOKO_CLI}/version_bump.php --path . --minor 2>/dev/null || true ;; + *) php ${MOKO_CLI}/version_bump.php --path . 2>/dev/null || true ;; + esac + + # Set stability suffix and fix consistency + VERSION=$(php ${MOKO_CLI}/version_read.php --path . 2>/dev/null || echo '00.00.01') + VERSION=$(echo "$VERSION" | sed 's/-\(dev\|alpha\|beta\|rc\)$//') php ${MOKO_CLI}/version_set_platform.php \ - --path . --version "$(php ${MOKO_CLI}/version_read.php --path . 2>/dev/null || echo '00.00.01')" \ - --branch "${{ github.ref_name }}" --stability "$STABILITY" 2>/dev/null || true + --path . --version "$VERSION" --branch "${{ github.ref_name }}" --stability "$STABILITY" 2>/dev/null || true php ${MOKO_CLI}/version_check.php --path . --fix 2>/dev/null || true - # Read final version (includes suffix, e.g. 01.02.15-dev) + # Read final version with suffix VERSION=$(php ${MOKO_CLI}/version_read.php --path . 2>/dev/null) [ -z "$VERSION" ] && VERSION="00.00.01" -- 2.52.0 From f3f356ae54cbfbdbb3fa4177838f2b1303293460 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Thu, 4 Jun 2026 17:58:43 -0500 Subject: [PATCH 3/3] ci: remove updates.xml steps from pre-release, use CLI version_bump - Remove updates_xml_build.php, updates.xml commit/push, branch sync steps - MokoGitea license server generates updates.xml dynamically - Pre-release now uses version_bump.php (patch for dev, --minor for RC) Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- .mokogitea/workflows/pre-release.yml | 51 ++-------------------------- CHANGELOG.md | 15 ++++---- 2 files changed, 9 insertions(+), 57 deletions(-) diff --git a/.mokogitea/workflows/pre-release.yml b/.mokogitea/workflows/pre-release.yml index 62e08c0..b341df8 100644 --- a/.mokogitea/workflows/pre-release.yml +++ b/.mokogitea/workflows/pre-release.yml @@ -153,55 +153,8 @@ jobs: --token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "$API_BASE" \ --repo "${GITEA_REPO}" --output /tmp || true - - name: Update updates.xml - if: steps.platform.outputs.platform == 'joomla' - run: | - VERSION="${{ steps.meta.outputs.version }}" - STABILITY="${{ steps.meta.outputs.stability }}" - SHA256="${{ steps.package.outputs.sha256_zip }}" - - if [ ! -f "updates.xml" ]; then - echo "No updates.xml -- skipping" - exit 0 - fi - - SHA_FLAG="" - [ -n "$SHA256" ] && SHA_FLAG="--sha ${SHA256}" - - php ${MOKO_CLI}/updates_xml_build.php \ - --path . --version "${VERSION}" --stability "${STABILITY}" \ - --gitea-url "${GITEA_URL}" --org "${GITEA_ORG}" --repo "${GITEA_REPO}" \ - ${SHA_FLAG} - - # Commit and push - if ! git diff --quiet updates.xml 2>/dev/null; then - git config --local user.email "gitea-actions[bot]@mokoconsulting.tech" - git config --local user.name "gitea-actions[bot]" - git add updates.xml - git commit -m "chore: update ${STABILITY} channel ${VERSION} [skip ci]" - git push origin HEAD 2>&1 || echo "WARNING: push failed" - fi - - - name: "Sync updates.xml to all branches" - if: steps.platform.outputs.platform == 'joomla' - run: | - CURRENT_BRANCH="${{ github.ref_name }}" - git config --local user.email "gitea-actions[bot]@mokoconsulting.tech" - git config --local user.name "gitea-actions[bot]" - - for BRANCH in main dev; do - [ "$BRANCH" = "$CURRENT_BRANCH" ] && continue - echo "Syncing updates.xml -> ${BRANCH}" - git fetch origin "${BRANCH}" 2>/dev/null || continue - git checkout "origin/${BRANCH}" -- updates.xml 2>/dev/null || continue - git checkout "${CURRENT_BRANCH}" -- updates.xml - if ! git diff --quiet updates.xml 2>/dev/null; then - git add updates.xml - git commit -m "chore: sync updates.xml from ${CURRENT_BRANCH} [skip ci]" - git push origin HEAD:refs/heads/${BRANCH} 2>&1 || echo "WARNING: push to ${BRANCH} failed" - fi - git checkout "${CURRENT_BRANCH}" 2>/dev/null - done + # updates.xml is generated dynamically by MokoGitea license server + # No need to build, commit, or sync updates.xml from workflows - name: "Delete lesser pre-release channels (cascade)" continue-on-error: true diff --git a/CHANGELOG.md b/CHANGELOG.md index f929864..9f46298 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,10 +13,9 @@ BRIEF: Release changelog ## [Unreleased] +## [09.23] --- 2026-05-31 -## [09.23.00] --- 2026-05-31 - -## [09.22.00] --- 2026-05-31 +## [09.22] --- 2026-05-31 ### Changed - **refactor(cli):** migrate 64 legacy scripts to CliFramework (#235) — all tools in cli/, automation/, maintenance/, deploy/, release/ now extend CliFramework with free --help, --verbose, --quiet, --dry-run, --json, banners, and coloured logging @@ -28,12 +27,12 @@ BRIEF: Release changelog - fix: remove lesser stream copies, each stream updates independently - fix: sort updates.xml entries dev first, stable last -## [09.21.00] --- 2026-05-30 +## [09.21] --- 2026-05-30 -## [09.20.00] --- 2026-05-30 +## [09.20] --- 2026-05-30 -## [09.19.00] --- 2026-05-30 +## [09.19] --- 2026-05-30 -## [09.18.00] --- 2026-05-30 +## [09.18] --- 2026-05-30 -## [09.17.00] --- 2026-05-30 +## [09.17] --- 2026-05-30 -- 2.52.0