From bd936194f7bba45fa37073cd3146c6602fa0c835 Mon Sep 17 00:00:00 2001 From: chefgs <7605658+chefgs@users.noreply.github.com> Date: Wed, 8 Jul 2026 05:56:40 +0000 Subject: [PATCH 1/6] chore: bump version to v0.4.7 [skip ci] --- CHANGELOG.md | 7 +++++++ README.md | 2 +- cli/__version__.py | 2 +- hugo-docs/content/_index.md | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5b56a6..68c85ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- +## [0.4.7] - 2026-07-08 + +### Changed +- Automated patch release — version bump to 0.4.7. + +--- + ## [0.4.6] - 2026-04-01 ### Changed diff --git a/README.md b/README.md index 3d90aec..96c967b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![CI](https://github.com/cloudengine-labs/devops_os/actions/workflows/ci.yml/badge.svg)](https://github.com/cloudengine-labs/devops_os/actions/workflows/ci.yml) [![Sanity Tests](https://github.com/cloudengine-labs/devops_os/actions/workflows/sanity.yml/badge.svg)](https://github.com/cloudengine-labs/devops_os/actions/workflows/sanity.yml) -[![Version](https://img.shields.io/badge/version-0.4.6-blue)](CHANGELOG.md) +[![Version](https://img.shields.io/badge/version-0.4.7-blue)](CHANGELOG.md) [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue?logo=python&logoColor=white)](https://www.python.org/) [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE) [![Open Source](https://img.shields.io/badge/open%20source-%E2%9D%A4-red)](https://github.com/cloudengine-labs/devops_os) diff --git a/cli/__version__.py b/cli/__version__.py index 89f193d..5216500 100644 --- a/cli/__version__.py +++ b/cli/__version__.py @@ -1,3 +1,3 @@ """Single source of truth for the devopsos package version.""" -__version__ = "0.4.6" +__version__ = "0.4.7" diff --git a/hugo-docs/content/_index.md b/hugo-docs/content/_index.md index 76cbb1f..cc74f5f 100644 --- a/hugo-docs/content/_index.md +++ b/hugo-docs/content/_index.md @@ -9,7 +9,7 @@ type: "docs" [![CI](https://github.com/cloudengine-labs/devops_os/actions/workflows/ci.yml/badge.svg)](https://github.com/cloudengine-labs/devops_os/actions/workflows/ci.yml) [![Sanity Tests](https://github.com/cloudengine-labs/devops_os/actions/workflows/sanity.yml/badge.svg)](https://github.com/cloudengine-labs/devops_os/actions/workflows/sanity.yml) -[![Version](https://img.shields.io/badge/version-0.4.6-blue)](https://github.com/cloudengine-labs/devops_os/blob/main/CHANGELOG.md) +[![Version](https://img.shields.io/badge/version-0.4.7-blue)](https://github.com/cloudengine-labs/devops_os/blob/main/CHANGELOG.md) [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue?logo=python&logoColor=white)](https://www.python.org/) [![License: MIT](https://img.shields.io/badge/license-MIT-green)](https://github.com/cloudengine-labs/devops_os/blob/main/LICENSE) From ee646359f25116a1172ec64ef30c215a19f475f9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Jul 2026 06:29:04 +0000 Subject: [PATCH 2/6] feat: generate release changelog from git diff --- .github/workflows/release.yml | 71 ++++++++++++++++++++++++----------- CHANGELOG.md | 5 ++- 2 files changed, 53 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb29bb6..68fd124 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,22 +78,69 @@ jobs: out.write(f"new_version={new_version}\n") PYEOF - # ── 2. Update CHANGELOG.md ──────────────────────────────────────────── + # ── 2. Update version badge in Hugo docs index ──────────────────────── + - name: Update version badge in Hugo docs + env: + NEW_VERSION: ${{ steps.bump.outputs.new_version }} + run: | + # Replace any existing version-X.Y.Z-blue badge with the new version + sed -i -E \ + "s|version-[0-9]+\.[0-9]+\.[0-9]+-blue|version-${NEW_VERSION}-blue|g" \ + hugo-docs/content/_index.md + + # ── 3. Update version badge in root README ──────────────────────────── + - name: Update version badge in root README + env: + NEW_VERSION: ${{ steps.bump.outputs.new_version }} + run: | + # Replace any existing version-X.Y.Z-blue badge with the new version + sed -i -E \ + "s|version-[0-9]+\.[0-9]+\.[0-9]+-blue|version-${NEW_VERSION}-blue|g" \ + README.md + + # ── 4. Update CHANGELOG.md from git diff ────────────────────────────── - name: Prepend CHANGELOG entry for new version env: NEW_VERSION: ${{ steps.bump.outputs.new_version }} run: | python - <<'PYEOF' import os + import subprocess from datetime import date new_version = os.environ["NEW_VERSION"] today = date.today().isoformat() + diff_output = subprocess.check_output( + ["git", "diff", "--name-status", "HEAD"], text=True + ).strip() + + changes = [] + for line in diff_output.splitlines(): + if not line.strip(): + continue + parts = line.split("\t", 1) + if len(parts) != 2: + continue + status, file_path = parts + status_label = { + "A": "Added", + "M": "Updated", + "D": "Removed", + "R": "Renamed", + "C": "Copied", + }.get(status[:1], "Updated") + changes.append(f"- {status_label} `{file_path}`.") + + if not changes: + changes = [f"- Updated release metadata for `{new_version}`."] + + changes.append("- Updated `CHANGELOG.md`.") + entry = ( f"\n## [{new_version}] - {today}\n\n" f"### Changed\n" - f"- Automated patch release — version bump to {new_version}.\n\n" + f"{chr(10).join(changes)}\n\n" f"---\n" ) @@ -115,26 +162,6 @@ jobs: print(f"CHANGELOG updated with {new_version} entry") PYEOF - # ── 3. Update version badge in Hugo docs index ──────────────────────── - - name: Update version badge in Hugo docs - env: - NEW_VERSION: ${{ steps.bump.outputs.new_version }} - run: | - # Replace any existing version-X.Y.Z-blue badge with the new version - sed -i -E \ - "s|version-[0-9]+\.[0-9]+\.[0-9]+-blue|version-${NEW_VERSION}-blue|g" \ - hugo-docs/content/_index.md - - # ── 4. Update version badge in root README ──────────────────────────── - - name: Update version badge in root README - env: - NEW_VERSION: ${{ steps.bump.outputs.new_version }} - run: | - # Replace any existing version-X.Y.Z-blue badge with the new version - sed -i -E \ - "s|version-[0-9]+\.[0-9]+\.[0-9]+-blue|version-${NEW_VERSION}-blue|g" \ - README.md - # ── 5. Open a PR with the version-bump changes ──────────────────────── # peter-evans/create-pull-request creates commits via the GitHub API so # they are automatically verified (signed), satisfying the branch diff --git a/CHANGELOG.md b/CHANGELOG.md index 68c85ce..f43561b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.4.7] - 2026-07-08 ### Changed -- Automated patch release — version bump to 0.4.7. +- Bumped CLI version to `0.4.7` in `cli/__version__.py`. +- Updated version badge to `0.4.7` in `README.md`. +- Updated version badge to `0.4.7` in `hugo-docs/content/_index.md`. +- Added this release entry to `CHANGELOG.md`. --- From 0523a4445ec32a86dee19c4652acdcbcb10f38c9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Jul 2026 06:29:48 +0000 Subject: [PATCH 3/6] fix: avoid self-referential changelog release entries --- .github/workflows/release.yml | 6 +++--- CHANGELOG.md | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 68fd124..227c98c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -123,6 +123,8 @@ jobs: if len(parts) != 2: continue status, file_path = parts + if file_path == "CHANGELOG.md": + continue status_label = { "A": "Added", "M": "Updated", @@ -135,12 +137,10 @@ jobs: if not changes: changes = [f"- Updated release metadata for `{new_version}`."] - changes.append("- Updated `CHANGELOG.md`.") - entry = ( f"\n## [{new_version}] - {today}\n\n" f"### Changed\n" - f"{chr(10).join(changes)}\n\n" + f"{'\\n'.join(changes)}\n\n" f"---\n" ) diff --git a/CHANGELOG.md b/CHANGELOG.md index f43561b..c0fd5f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bumped CLI version to `0.4.7` in `cli/__version__.py`. - Updated version badge to `0.4.7` in `README.md`. - Updated version badge to `0.4.7` in `hugo-docs/content/_index.md`. -- Added this release entry to `CHANGELOG.md`. --- From cbd9f0caf984332265aa23674e005931e664e801 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Jul 2026 06:30:31 +0000 Subject: [PATCH 4/6] refactor: tighten git-diff changelog generation in release workflow --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 227c98c..7b5b131 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -132,10 +132,10 @@ jobs: "R": "Renamed", "C": "Copied", }.get(status[:1], "Updated") - changes.append(f"- {status_label} `{file_path}`.") + changes.append(f"- {status_label} file `{file_path}`.") if not changes: - changes = [f"- Updated release metadata for `{new_version}`."] + raise SystemExit("ERROR: no release file changes detected from git diff") entry = ( f"\n## [{new_version}] - {today}\n\n" From 9c072e25ba0494cc2df4f1698458410aac3b7e55 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Jul 2026 06:31:12 +0000 Subject: [PATCH 5/6] fix: harden changelog diff formatting in release workflow --- .github/workflows/release.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b5b131..a38ff3c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -131,16 +131,22 @@ jobs: "D": "Removed", "R": "Renamed", "C": "Copied", - }.get(status[:1], "Updated") + }.get(status[:1]) + if status_label is None: + print(f"WARNING: unknown git diff status '{status}' for '{file_path}', treating as Updated") + status_label = "Updated" changes.append(f"- {status_label} file `{file_path}`.") if not changes: - raise SystemExit("ERROR: no release file changes detected from git diff") + raise SystemExit( + "ERROR: no release file changes detected from git diff. " + "Check prior version-bump and badge-update steps." + ) entry = ( f"\n## [{new_version}] - {today}\n\n" f"### Changed\n" - f"{'\\n'.join(changes)}\n\n" + f"{'\n'.join(changes)}\n\n" f"---\n" ) From e822cf922742c112ab590494abcaed0dc792162d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Jul 2026 06:31:48 +0000 Subject: [PATCH 6/6] chore: simplify release changelog file-entry wording --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a38ff3c..7aaff20 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -135,7 +135,7 @@ jobs: if status_label is None: print(f"WARNING: unknown git diff status '{status}' for '{file_path}', treating as Updated") status_label = "Updated" - changes.append(f"- {status_label} file `{file_path}`.") + changes.append(f"- {status_label} `{file_path}`.") if not changes: raise SystemExit(