From 5a9de4f205983c2079f4e7ea444e607346ce0f8e Mon Sep 17 00:00:00 2001 From: Swately Date: Tue, 19 May 2026 06:24:24 -0600 Subject: [PATCH] chore: wire release-please to bump CMake + version.hpp on every release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit release-please was installed in PR #9 but its `extra-files` arrays were empty — it only bumped .release-please-manifest.json on each release, leaving the actual source-of-truth version constants stale: framework/_meta/include/phyriad/version.hpp stuck at 1.0.0 CMakeLists.txt stuck at 1.0.0 + rc2 apps/ayama/CMakeLists.txt stuck at 0.1.0 GitHub Releases meanwhile advanced to v1.0.3 / ayama-v0.1.3. This commit: 1. Sync all source-of-truth version files to the currently released versions (1.0.3, 0.1.3) and drop the now-stale 'rc2' prerelease tag — every public release shipped so far has been stable. 2. Add x-release-please-{major,minor,patch,version} marker comments on the four lines release-please needs to rewrite on each future release. The markers stay inert at compile time (they sit inside trailing `# ...` / `// ...` comments). 3. Create apps/ayama/core/include/ayama/version.hpp mirroring the framework's version.hpp — same MAJOR/MINOR/PATCH/MAKE_VERSION/STRING macros. Lives under ayama_core which already exposes its include dir as PUBLIC, so ayama-ui / ayama-cli / ayama-agent pick it up transitively. 4. Populate `extra-files` in release-please-config.json so the release PR rewrites all four files in lock-step with the manifest bump. After this lands, a `fix:` or `feat:` commit to main triggers a release-please PR that updates BOTH the manifest AND the in-source version constants. Merging that PR tags the commit; release.yml / release-ayama.yml then build a ZIP whose .exe knows its own version at runtime — the foundation for the upcoming "check for updates" feature in ayama-ui (PR forthcoming). Verified locally: ayama-ui.exe links clean on MinGW gcc 15.2 with the new headers. Co-Authored-By: Claude Sonnet 4.6 --- CMakeLists.txt | 5 ++- apps/ayama/CMakeLists.txt | 2 +- apps/ayama/core/include/ayama/version.hpp | 29 +++++++++++++++ framework/_meta/include/phyriad/version.hpp | 13 +++++-- release-please-config.json | 41 ++++++++++++++++++++- 5 files changed, 81 insertions(+), 9 deletions(-) create mode 100644 apps/ayama/core/include/ayama/version.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 40e2095..c3804db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,10 +17,11 @@ # See ARCHITECTURE.md for the rationale behind the framework/apps split. cmake_minimum_required(VERSION 3.20) -project(Phyriad LANGUAGES CXX VERSION 1.0.0) +project(Phyriad LANGUAGES CXX VERSION 1.0.3) # x-release-please-version # Pre-release tag — applied to PhyriadConfigVersion.cmake as text after the # semver triple. Empty for final releases. See framework/_meta/include/phyriad/version.hpp. -set(PHYRIAD_VERSION_PRERELEASE "rc2") +# release-please drives the VERSION above; this stays empty for stable releases. +set(PHYRIAD_VERSION_PRERELEASE "") set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/apps/ayama/CMakeLists.txt b/apps/ayama/CMakeLists.txt index 7577eb8..07a0ad7 100644 --- a/apps/ayama/CMakeLists.txt +++ b/apps/ayama/CMakeLists.txt @@ -14,7 +14,7 @@ # AYAMA_BUILD_UI — build ayama-ui standalone window (default ON) # cmake_minimum_required(VERSION 3.20) -project(Ayama LANGUAGES CXX VERSION 0.1.0) +project(Ayama LANGUAGES CXX VERSION 0.1.3) # x-release-please-version set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/apps/ayama/core/include/ayama/version.hpp b/apps/ayama/core/include/ayama/version.hpp new file mode 100644 index 0000000..e91ee25 --- /dev/null +++ b/apps/ayama/core/include/ayama/version.hpp @@ -0,0 +1,29 @@ +// apps/ayama/core/include/ayama/version.hpp +// Ayama — compile-time version constants. +// +// Mirrors the layout of phyriad/version.hpp. Ayama and Phyriad version +// independently: a fix in Ayama bumps AYAMA_VERSION_PATCH without touching +// PHYRIAD_VERSION_*, and vice versa. +// +// release-please maintains the numeric MAJOR/MINOR/PATCH and the string +// AYAMA_VERSION_STRING in sync automatically. The marker comments +// immediately after each value are how release-please locates the line +// to bump; do not remove them. +// +// Consumers (ayama-ui's version-check feature) compare AYAMA_VERSION_STRING +// against the GitHub Releases API to detect when a newer ayama-vX.Y.Z tag +// is available. +// +#pragma once + +#define AYAMA_VERSION_MAJOR 0 // x-release-please-major +#define AYAMA_VERSION_MINOR 1 // x-release-please-minor +#define AYAMA_VERSION_PATCH 3 // x-release-please-patch + +#define AYAMA_MAKE_VERSION(maj, min, patch) \ + (((maj) << 16) | ((min) << 8) | (patch)) + +#define AYAMA_VERSION \ + AYAMA_MAKE_VERSION(AYAMA_VERSION_MAJOR, AYAMA_VERSION_MINOR, AYAMA_VERSION_PATCH) + +#define AYAMA_VERSION_STRING "0.1.3" // x-release-please-version diff --git a/framework/_meta/include/phyriad/version.hpp b/framework/_meta/include/phyriad/version.hpp index ca2a31e..29a2579 100644 --- a/framework/_meta/include/phyriad/version.hpp +++ b/framework/_meta/include/phyriad/version.hpp @@ -5,11 +5,16 @@ // static_assert(PHYRIAD_VERSION >= PHYRIAD_MAKE_VERSION(1, 0, 0), // "Phyriad 1.0.0 or newer required"); // +// The numeric MAJOR/MINOR/PATCH and the string PHYRIAD_VERSION_STRING are +// kept in sync automatically by release-please. The marker comments +// immediately after each value are how release-please locates the line +// to bump; do not remove them. +// #pragma once -#define PHYRIAD_VERSION_MAJOR 1 -#define PHYRIAD_VERSION_MINOR 0 -#define PHYRIAD_VERSION_PATCH 0 +#define PHYRIAD_VERSION_MAJOR 1 // x-release-please-major +#define PHYRIAD_VERSION_MINOR 0 // x-release-please-minor +#define PHYRIAD_VERSION_PATCH 3 // x-release-please-patch // Optional pre-release tag. Empty for a final release. // "rc1", "rc2" — release candidates: feature-complete but pending @@ -24,4 +29,4 @@ #define PHYRIAD_VERSION \ PHYRIAD_MAKE_VERSION(PHYRIAD_VERSION_MAJOR, PHYRIAD_VERSION_MINOR, PHYRIAD_VERSION_PATCH) -#define PHYRIAD_VERSION_STRING "1.0.0" +#define PHYRIAD_VERSION_STRING "1.0.3" // x-release-please-version diff --git a/release-please-config.json b/release-please-config.json index a4aa2e0..89cd22f 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -8,6 +8,10 @@ "draft": false, "prerelease": false, + "pull-request-title-pattern": "chore${scope}: release ${component} ${version}", + "pull-request-header": ":robot: I have created a release *beep* *boop*", + "separate-pull-requests": false, + "_packages_doc": [ "Two release trains in this monorepo:", " - phyriad framework → tag prefix 'v' (matches release.yml on push.tags v*.*.*)", @@ -27,6 +31,21 @@ " chore / ci / docs / refactor / test / style / build → no bump" ], + "_extra_files_doc": [ + "Each path listed in a package's `extra-files` is rewritten on every", + "release. The lines that get rewritten are tagged with marker comments", + "that release-please scans for:", + " CMakeLists.txt:", + " project(... VERSION X.Y.Z) # x-release-please-version", + " framework/_meta/include/phyriad/version.hpp + ayama/version.hpp:", + " #define ..._VERSION_MAJOR X // x-release-please-major", + " #define ..._VERSION_MINOR Y // x-release-please-minor", + " #define ..._VERSION_PATCH Z // x-release-please-patch", + " #define ..._VERSION_STRING \"X.Y.Z\" // x-release-please-version", + "Without these markers the file is left untouched. Keep them in sync", + "between the config below and the actual files." + ], + "packages": { ".": { "component": "phyriad", @@ -37,7 +56,16 @@ "exclude-paths": [ "apps/ayama" ], - "extra-files": [] + "extra-files": [ + { + "type": "generic", + "path": "CMakeLists.txt" + }, + { + "type": "generic", + "path": "framework/_meta/include/phyriad/version.hpp" + } + ] }, "apps/ayama": { "component": "ayama", @@ -45,7 +73,16 @@ "include-component-in-tag": true, "changelog-path": "CHANGELOG.md", "release-type": "simple", - "extra-files": [] + "extra-files": [ + { + "type": "generic", + "path": "CMakeLists.txt" + }, + { + "type": "generic", + "path": "core/include/ayama/version.hpp" + } + ] } } }