From e188df9b4b595e04da11efaec3af6687e9e4af7d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Jan 2026 01:15:48 +0000 Subject: [PATCH 1/5] Initial plan -- 2.49.1 From d65ccfe6bac01e8ebdd5b428d7f3cac3dc520e1e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Jan 2026 01:18:20 +0000 Subject: [PATCH 2/5] Add date normalization script for release pipeline Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com> --- scripts/release/update_dates.sh | 67 +++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100755 scripts/release/update_dates.sh diff --git a/scripts/release/update_dates.sh b/scripts/release/update_dates.sh new file mode 100755 index 0000000..3e485e4 --- /dev/null +++ b/scripts/release/update_dates.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +# Copyright (C) 2025 Moko Consulting +# +# This file is part of a Moko Consulting project. +# +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see https://www.gnu.org/licenses/ . +# +# FILE INFORMATION +# DEFGROUP: Release +# INGROUP: Moko-Cassiopeia +# PATH: scripts/release/update_dates.sh +# VERSION: 03.05.00 +# BRIEF: Normalize dates in release files + +set -euo pipefail + +# Accept date and version as arguments +TODAY="${1:-$(date +%Y-%m-%d)}" +VERSION="${2:-unknown}" + +echo "Date normalization script running..." +echo "TODAY: ${TODAY}" +echo "VERSION: ${VERSION}" + +# Update CHANGELOG.md - replace the date on the version heading line +if [ -f "CHANGELOG.md" ]; then + # Match lines like "## [03.05.00] 2026-01-04" and update the date + if grep -q "^## \[${VERSION}\] " CHANGELOG.md; then + sed -i "s/^## \[${VERSION}\] [0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/## [${VERSION}] ${TODAY}/" CHANGELOG.md + echo "✓ Updated CHANGELOG.md version [${VERSION}] date to ${TODAY}" + else + echo "⚠ Warning: CHANGELOG.md does not contain version [${VERSION}] heading" + fi +else + echo "⚠ Warning: CHANGELOG.md not found" +fi + +# Update src/templates/templateDetails.xml - replace the tag +if [ -f "src/templates/templateDetails.xml" ]; then + sed -i "s|[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}|${TODAY}|" src/templates/templateDetails.xml + echo "✓ Updated src/templates/templateDetails.xml creationDate to ${TODAY}" +else + echo "⚠ Warning: src/templates/templateDetails.xml not found" +fi + +# Update updates.xml - replace the tag +if [ -f "updates.xml" ]; then + sed -i "s|[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}|${TODAY}|" updates.xml + echo "✓ Updated updates.xml creationDate to ${TODAY}" +else + echo "⚠ Warning: updates.xml not found" +fi + +echo "Date normalization complete." -- 2.49.1 From 1ee2b16c7ba59688c7f3e60398aace8f57214aa8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Jan 2026 01:19:43 +0000 Subject: [PATCH 3/5] Improve date normalization script with validation and regex escaping Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com> --- scripts/release/update_dates.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/release/update_dates.sh b/scripts/release/update_dates.sh index 3e485e4..f8875af 100755 --- a/scripts/release/update_dates.sh +++ b/scripts/release/update_dates.sh @@ -31,15 +31,24 @@ set -euo pipefail TODAY="${1:-$(date +%Y-%m-%d)}" VERSION="${2:-unknown}" +# Validate date format (YYYY-MM-DD) +if ! [[ "${TODAY}" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then + echo "ERROR: Invalid date format '${TODAY}'. Expected YYYY-MM-DD format." + exit 1 +fi + echo "Date normalization script running..." echo "TODAY: ${TODAY}" echo "VERSION: ${VERSION}" +# Escape special regex characters in VERSION for safe use in grep and sed +VERSION_ESCAPED=$(printf '%s\n' "${VERSION}" | sed 's/[]\/$*.^[]/\\&/g') + # Update CHANGELOG.md - replace the date on the version heading line if [ -f "CHANGELOG.md" ]; then # Match lines like "## [03.05.00] 2026-01-04" and update the date - if grep -q "^## \[${VERSION}\] " CHANGELOG.md; then - sed -i "s/^## \[${VERSION}\] [0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/## [${VERSION}] ${TODAY}/" CHANGELOG.md + if grep -q "^## \[${VERSION_ESCAPED}\] " CHANGELOG.md; then + sed -i "s/^## \[${VERSION_ESCAPED}\] [0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/## [${VERSION_ESCAPED}] ${TODAY}/" CHANGELOG.md echo "✓ Updated CHANGELOG.md version [${VERSION}] date to ${TODAY}" else echo "⚠ Warning: CHANGELOG.md does not contain version [${VERSION}] heading" -- 2.49.1 From 91b2c643d2d6c72bf4d4a3959fc3a763cf09dbce Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Jan 2026 01:20:41 +0000 Subject: [PATCH 4/5] Fix regex character class in version escaping Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com> --- CHANGELOG.md | 2 +- scripts/release/update_dates.sh | 3 ++- src/templates/templateDetails.xml | 2 +- updates.xml | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index daef112..2d85894 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ # Changelog — Moko-Cassiopeia (VERSION: 03.05.00) -## [03.05.00] 2026-01-04 +## [03.05.00] 2026-01-09 - Created `.github/workflows` - Replaced `./CODE_OF_CONDUCT.md` from `MokoStandards` - Replaced `./CONTRIBUTING.md` from `MokoStandards` diff --git a/scripts/release/update_dates.sh b/scripts/release/update_dates.sh index f8875af..77f6031 100755 --- a/scripts/release/update_dates.sh +++ b/scripts/release/update_dates.sh @@ -42,7 +42,8 @@ echo "TODAY: ${TODAY}" echo "VERSION: ${VERSION}" # Escape special regex characters in VERSION for safe use in grep and sed -VERSION_ESCAPED=$(printf '%s\n' "${VERSION}" | sed 's/[]\/$*.^[]/\\&/g') +# Escapes: ] \ / $ * . ^ [ +VERSION_ESCAPED=$(printf '%s\n' "${VERSION}" | sed 's/[][\/$*.^]/\\&/g') # Update CHANGELOG.md - replace the date on the version heading line if [ -f "CHANGELOG.md" ]; then diff --git a/src/templates/templateDetails.xml b/src/templates/templateDetails.xml index b542812..519b376 100644 --- a/src/templates/templateDetails.xml +++ b/src/templates/templateDetails.xml @@ -35,7 +35,7 @@ moko-cassiopeia 03.05.00 - 2025-12-23 + 2026-01-09 Jonathan Miller || Moko Consulting hello@mokoconsulting.tech (C)GNU General Public License Version 3 - 2025 Moko Consulting diff --git a/updates.xml b/updates.xml index 802974b..8eec322 100644 --- a/updates.xml +++ b/updates.xml @@ -30,7 +30,7 @@ site 03.05.00 - 2025-12-12 + 2026-01-09 Jonathan Miller || Moko Consulting hello@mokoconsulting.tech (C)GNU General Public License Version 3 - 2025 Moko Consulting -- 2.49.1 From f730b9f68fcd6177c7bb585b95736d9f81998f95 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Jan 2026 01:21:46 +0000 Subject: [PATCH 5/5] Revert test date changes from data files Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com> --- CHANGELOG.md | 2 +- src/templates/templateDetails.xml | 2 +- updates.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d85894..daef112 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ # Changelog — Moko-Cassiopeia (VERSION: 03.05.00) -## [03.05.00] 2026-01-09 +## [03.05.00] 2026-01-04 - Created `.github/workflows` - Replaced `./CODE_OF_CONDUCT.md` from `MokoStandards` - Replaced `./CONTRIBUTING.md` from `MokoStandards` diff --git a/src/templates/templateDetails.xml b/src/templates/templateDetails.xml index 519b376..b542812 100644 --- a/src/templates/templateDetails.xml +++ b/src/templates/templateDetails.xml @@ -35,7 +35,7 @@ moko-cassiopeia 03.05.00 - 2026-01-09 + 2025-12-23 Jonathan Miller || Moko Consulting hello@mokoconsulting.tech (C)GNU General Public License Version 3 - 2025 Moko Consulting diff --git a/updates.xml b/updates.xml index 8eec322..802974b 100644 --- a/updates.xml +++ b/updates.xml @@ -30,7 +30,7 @@ site 03.05.00 - 2026-01-09 + 2025-12-12 Jonathan Miller || Moko Consulting hello@mokoconsulting.tech (C)GNU General Public License Version 3 - 2025 Moko Consulting -- 2.49.1