Community程式設計與開發github.com

準備 Core Kit 發行版

透過更新版本號及修改變更日誌,來準備 bottlerocket-core-kit 的發行。

準備 Core Kit 發行版 是什麼?

此技能旨在自動化 bottlerocket-core-kit 儲存庫的發行準備流程。它會引導使用者依序執行兩個必要的 Git 提交:第一個提交用於更新 Twoliter.toml 中的版本號,第二個提交則用於更新 CHANGELOG.md。該技能強調從 Git 歷史記錄中正確識別並分類變更,特別是區分第一方(first-party)套件與第三方(third-party)套件更新,並確保變更日誌條目遵循嚴格的格式要求(例如:第三方更新不得包含版本號、需附加 PR 參考連結)。使用者可以透過此技能可靠地產生結構化的發行版本與變更日誌,適用於 Cursor 等支援技能執行的開發環境。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/cbgbt/bottlerocket-forest/tree/main/skills/prepare-core-kit-release

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

準備 Core Kit 發行版 是做什麼的?

透過更新 Twoliter.toml 中的版本號以及修改 CHANGELOG.md,來準備 bottlerocket-core-kit 儲存庫的新發行版。

目的

自動化 bottlerocket-core-kit 的發行準備工作流程:

  • 在 Twoliter.toml 中更新發行版本號
  • 從 Git 歷史記錄產生變更日誌條目
  • 建立格式正確的發行提交

使用時機

  • 準備 bottlerocket-core-kit 的新發行版
  • 需要以最近的變更來更新變更日誌
  • 建立具有正確格式的發行提交

先決條件

  • 在已檢出 bottlerocket-core-kit 的 grove 中工作
  • 具有包含合併提交和 PR 參考的 Git 歷史記錄
  • 了解目標發行版本號

流程

發行工作流程

重要:發行流程需要嚴格的兩個提交順序:

提交 1:版本更新(必須為第一個)

更新 Twoliter.toml 以設定新的發行版本:

# 在 Twoliter.toml 中,更新:
release-version = "X.Y.Z"

提交指令:

git add Twoliter.toml && git commit -s -S -m "twoliter: bump kit version to vX.Y.Z"

提交 2:變更日誌更新(必須為第二個)

使用新版本的變更來更新 CHANGELOG.md。

提交指令:

git add CHANGELOG.md && git commit -s -S -m "changelog: update for vX.Y.Z"

1. 識別新提交

  • 使用以下指令找出自上次變更日誌條目以來的提交:git log --oneline <last_version_tag>..HEAD
  • 如果沒有標籤,則使用:git log --oneline --since="<last_release_date>"

2. 尋找 PR 參考

  • 分析合併提交以尋找 PR 編號:git log --merges --oneline <last_version_tag>..HEAD
  • 在提交訊息中尋找 "Merge pull request #XXX" 等模式
  • 將提交雜湊值與 PR 合併提交進行交叉比對

3. 關鍵:驗證 PR 內容

務必透過檢查實際修改的檔案來驗證每個 PR 中包含哪些套件/變更:

git show <merge_commit_hash> --stat

請勿依賴:

  • 僅看提交訊息摘要
  • PR 分支名稱
  • 對 PR 內容的假設

注意混合型 PR: 一個 PR 可能同時包含第一方變更和第三方套件更新。您必須為同一個 PR 中的每種變更類型分別建立變更日誌條目。

混合型 PR 範例(PR #760):

git show 70609d6a --stat
# 顯示變更的內容:
#   sources/host-ctr/...          <- 第一方變更(host-ctr 解析器)
#   packages/amazon-vpc-cni-plugins/...  <- 第三方更新
#   packages/ecs-agent/...        <- 第三方更新

這個 PR 需要兩個變更日誌條目:

  1. OS 變更:「在 host-ctr 中以 Docker 解析器取代 amazon-ecr-containerd-resolver ([#760])」
  2. 第三方套件更新:「更新 amazon-vpc-cni-plugins、ecs-agent ([#760])」

正確驗證的範例:

# 針對合併提交 9656d841(PR #795):
git show 9656d841 --stat
# 顯示:libcap、liburcu、libxcrypt、readline 的變更
# 並非分支名稱或摘要可能暗示的內容

4. 變更日誌風格指南

版本標題格式

# v<VERSION> (<YYYY-MM-DD>)

段落層級

  1. OS 變更 - 核心系統和第一方套件更新
    • 第一方套件更新(附詳細子項目)
    • 第三方套件更新子段落,用於外部套件
  2. 建置變更 - 建置系統、工具和基礎設施的變更
  3. 編排器變更 - 容器編排特定的變更
    • 必要時包含 Kubernetes 子段落

條目格式

  • 使用帶有 PR 參考的項目符號:- 描述 ([#XXX])
  • 對於第一方套件,在適當情況下包含詳細的子項目
  • 對於第三方套件更新:請勿包含版本號碼
    • 正確:- Update \docker-cli-29`、`docker-engine-29` ([#785])`
    • 錯誤:- Update \docker-cli-29` to v29.0.4、`docker-engine-29` to v29.0.4 ([#785])`
  • 對於修補程式/修正,請使用「Patch」而非「Update」:
    • 正確:- Patch \containerd-2.1` to update GRPC ([#801])`

分類規則

  • 第一方套件:Bottlerocket 專用程式碼和內部依賴項
  • 第三方套件:外部函式庫和工具(glibc、docker-engine 等)
  • 建置變更:任何影響建置系統、CI/CD 或開發工具的內容
  • 編排器變更:Kubernetes、ECS 或其他容器編排功能

5. 品質檢查

  • 確保所有條目都有格式為 ([#XXX]) 的 PR 參考
  • 驗證格式和縮排的一致性
  • 將相關變更分組,以避免重複的條目
  • 維持段落內的時間順序
  • 檢查子段落標題是否與現有模式相符
  • 在撰寫條目前,務必驗證每個 PR 的實際內容

驗證

驗證指令

  • 確認 Git 記錄範圍:git log --oneline <range>
  • 檢查合併提交:git log --merges --grep="pull request" <range>
  • 檢查 PR 內容:git show <merge_hash> --stat
  • 驗證 PR 編號是否存在於儲存庫中

成功的發行準備包含:

  • 兩個順序正確的提交(版本更新在前,變更日誌在後)
  • Twoliter.toml 已更新 release-version
  • CHANGELOG.md 包含新的版本段落及正確日期
  • 所有條目都有 ([#XXX]) 格式的 PR 參考
  • 第三方套件更新未包含版本號碼
  • 提交已簽署(-s -S 旗標)

常見問題

缺少 PR 參考

如果合併提交未顯示 PR 編號,請檢查:

git log --merges --oneline | head -20

尋找 "Merge pull request #XXX" 模式。

套件分類錯誤

在將變更分類為第一方或第三方之前,務必使用 git show <hash> --stat 來確認實際變更的檔案。

第三方更新中的版本號

請記住:第三方套件更新條目不應包含版本號碼,僅包含套件名稱。

輸出結構範例

# v12.3.0 (2026-01-20)

## OS 變更
- 在 `host-ctr` 中以 Docker 解析器取代 `amazon-ecr-containerd-resolver` ([#760])
- 為 `nvidia-k8s-device-plugin` 新增 MPS 控制 daemon 支援 ([#789])

### 第三方套件更新
- 更新 `docker-cli-29`、`docker-engine-29` ([#785])
- 修補 `containerd-2.1` 以更新 GRPC ([#801])
- 更新 `libnvme`、`xfsprogs`、`nvme-cli`、`makedumpfile`、`keyutils`、`e2fsprogs` ([#794])
- 更新 `readline`、`libxcrypt`、`liburcu`、`libcap` ([#795])

[#760]: https://github.com/bottlerocket-os/bottlerocket-core-kit/pull/760
[#785]: https://github.com/bottlerocket-os/bottlerocket-core-kit/pull/785
[#789]: https://github.com/bottlerocket-os/bottlerocket-core-kit/pull/789
[#794]: https://github.com/bottlerocket-os/bottlerocket-core-kit/pull/794
[#795]: https://github.com/bottlerocket-os/bottlerocket-core-kit/pull/795
[#801]: https://github.com/bottlerocket-os/bottlerocket-core-kit/pull/801

Individual skills in this repo

This repo contains 19 individual skills — each has its own dedicated page.

ad-hoc-implementation-plan

Transform a rough plan into implement-commit ready artifacts. Allows rigorous review while implementing.

build-kit-locally

Build a kit and publish it to a locally hosted registry for development testing

build-variant-from-local-kits

Build a variant using locally published kits for development validation

deep-research

Create educational documents that build understanding progressively with citations

edit-spec-file

Edit Bottlerocket RPM spec files following project style conventions

fact-find

Quick lookup of specific facts about Bottlerocket with citations

idea-honing

Clarify feature ideas through iterative Q&A, recording insights to guide concept development

implement-commit

Implement commits from an implementation plan using a TDD pipeline

local-registry

Start and manage a local OCI registry for Bottlerocket kit development

propose-feature-concept

Create a new feature concept document to pitch the idea and explain the problem/solution

propose-feature-design

Create or update feature technical design document with architecture and implementation guidance

propose-feature-requirements

Create or update feature requirements specification using EARS notation with examples and appendices

propose-feature-test-plan

Create a test plan mapping EARS requirements and Critical Constraints to specific tests

propose-implementation-plan

Create an implementation plan with atomic commits that build toward a complete feature

review-code

Deep code review generating PR comments via principled question-driven analysis

review-scope

Verify code changes match intended scope and requirements without exceeding boundaries

review-style

Verify code follows project style guides without providing improvement suggestions

test-local-twoliter

Build and test local changes to twoliter before releasing

update-twoliter

Update all Bottlerocket repositories to a new Twoliter version

相關技能