원클릭으로
update-changelogs
// Update CHANGELOG.md files and cabal version numbers for all packages changed since origin/master, following PVP and project RELEASING.md rules. Use when preparing a PR or when asked to update changelogs or version numbers.
// Update CHANGELOG.md files and cabal version numbers for all packages changed since origin/master, following PVP and project RELEASING.md rules. Use when preparing a PR or when asked to update changelogs or version numbers.
| name | update-changelogs |
| description | Update CHANGELOG.md files and cabal version numbers for all packages changed since origin/master, following PVP and project RELEASING.md rules. Use when preparing a PR or when asked to update changelogs or version numbers. |
| argument-hint | [package-root] |
| disable-model-invocation | true |
| allowed-tools | Bash(git *), Read, Grep, Glob, Edit |
| model | opus |
| effort | max |
| hooks | {"Stop":[{"hooks":[{"type":"command","command":"scripts/format-changelogs.sh"}]}]} |
Update CHANGELOG.md files and .cabal version numbers for packages changed since origin/master.
If $ARGUMENTS is non-empty, restrict to that package root (e.g. libs/cardano-ledger-core). Otherwise, update all affected packages.
Reference docs:
RELEASING.md (excluded packages, test packages, upper/lower bound policy, changelog conventions, version bump logic)!`git diff origin/master... --name-only`
Map each changed file to its package root:
eras/<era>/impl/ → era implementation packageeras/<era>/test-suite/ → era test-suite packagelibs/<lib>/ → library packageIgnore files in excluded packages (see RELEASING.md) and files outside any package. If $ARGUMENTS was given, use only that package.
For each package, read the top-most ## <version> heading in CHANGELOG.md (the current unreleased version) and the version: field in the .cabal file.
The .cabal version may lag behind the CHANGELOG. After a CHaP release, ./scripts/bump-changelogs.sh adds a new empty patch-bump section to the CHANGELOG but does not update the .cabal. The CHANGELOG version is authoritative. When you bump, update both.
Read git diff origin/master -- <package-root> excluding CHANGELOG.md and .cabal changes. Classify using PVP rules (see https://pvp.haskell.org/) with the following project-specific caveats:
These are never API changes regardless of where they appear:
spec entry-point functions — not part of the API; downstream packages do not depend on them.cardano-ledger-shelley-test, cardano-ledger-shelley-ma-test, cardano-ledger-alonzo-test): Only breaking changes get changelog entries. Non-breaking changes get an empty entry (*). See RELEASING.md § "Test packages".See RELEASING.md § "CHANGELOG.md" for the version bump decision logic. In practice only B is bumped for breaking changes (A.(B+1).0.0). Bumping A is extremely rare — always ask the user first.
Critical rule: The top ## <version> entry in every CHANGELOG.md is always the current unreleased version — it has not been published to CHaP yet. Never add a new version section. Instead, replace the existing top version number if your changes warrant a larger bump than what is already there. For example, if the top entry is ## 1.13.0.1 (a patch) but your changes are breaking, replace it with ## 1.14.0.0. If the existing version already reflects a sufficient bump, leave it as-is and just add your changelog entries under it.
## <version> heading if the version changed.### \testlib`, ### `cddl``) after main library entries. Within that subsection, new entries are also prepended before existing sub-library entries.If no entry is warranted, leave the body as-is but still bump the heading if required.
Formatting: Imperative mood ("Add", "Remove", "Change" — not past tense). Backticks around all code identifiers. See existing entries in each CHANGELOG.md for style. Common patterns:
* Add `someFunction`
* Remove deprecated `oldFunction`
* Renamed:
- `oldName` -> `newName`
* Changed the type of the following fields to `CompactForm Coin` in `SomePParams`:
- `fieldA`
- `fieldB`
* Move validation from `DELEGS` to `DELEG` rule:
- Add `SomeFailure` to `ShelleyDelegPredFailure`
- Remove `SomeFailure` from `ShelleyDelegsPredFailure`
* Add `newFunction` and deprecate `oldFunction` in its favor
### `testlib`
* Add `withIssuerAndTxsInBlock_` and `withIssuerAndTxsInBlock`
.cabal versionFor every package whose version changed, update the version: field to match the new CHANGELOG version.
For every bumped package, grep -rn '<pkg>.*<old-minor>' --include='*.cabal' . across the entire repo to find stale bounds — not just in packages with changed files.
See RELEASING.md § "Lower bounds" and "Upper bounds" for general policy. Additional guidance:
testlib) and the main library is unchanged, only packages that depend on and use the changed sub-library API need a lower bound raise. Packages that only depend on the main library just need their upper bound widened.^>=X.Y means >= X.Y && < X.(Y+1), so a bump from 1.18 to 1.19 requires updating all ^>=1.18 constraints to ^>=1.19.Print a compact table:
| Package | Old version | New version | Bump type | Reason |
|---|---|---|---|---|
| ... | ... | ... | ... | ... |
List skipped packages in a note below. Flag any uncertain classifications for review.
If you are unsure whether a change is breaking, stop and ask the user before editing.