docs: clean up README now that source filtering works on >=0.28.0

This commit is contained in:
2026-03-15 01:49:24 -07:00
parent 8ca7ff362d
commit 58003db568

View File

@@ -15,24 +15,18 @@ Files distributed from `src/`:
## Usage ## Usage
> **Requires common-repo ≥ 0.28.0** for source-declared filtering.
### Add to an existing `.common-repo.yaml` ### Add to an existing `.common-repo.yaml`
```yaml ```yaml
# .common-repo.yaml # .common-repo.yaml
- repo: - repo:
url: https://github.com/christmas-island/cr-semantic-release url: https://github.com/christmas-island/cr-semantic-release
ref: v1.0.0 ref: v1.1.0
with:
- include: ["src/**", "src/.*", "src/.*/**"]
- rename:
- "^src/(.*)$": "$1"
``` ```
> **Note:** Source-declared filtering is not yet functional in common-repo 0.27.0 That's it. The source repo's `.common-repo.yaml` handles scoping to `src/` and stripping the prefix.
> ([#226](https://github.com/common-repo/common-repo/issues/226),
> [#227](https://github.com/common-repo/common-repo/issues/227)).
> The `with:` clause above is required until those are fixed, at which point
> consumers will only need the `repo:` block.
### Apply ### Apply
@@ -45,6 +39,7 @@ cr apply # apply
``` ```
cr-semantic-release/ cr-semantic-release/
├── .common-repo.yaml ← source-declared filtering (include src/, rename to root)
├── .github/workflows/ ← this repo's own CI (dogfooding) ├── .github/workflows/ ← this repo's own CI (dogfooding)
│ ├── ci.yaml ← sync check: top-level == src/ │ ├── ci.yaml ← sync check: top-level == src/
│ ├── commitlint.yml ← commit linting for this repo │ ├── commitlint.yml ← commit linting for this repo
@@ -89,7 +84,7 @@ If you only want a subset:
```yaml ```yaml
- repo: - repo:
url: https://github.com/christmas-island/cr-semantic-release url: https://github.com/christmas-island/cr-semantic-release
ref: v1.0.0 ref: v1.1.0
with: with:
- include: ["src/.releaserc.yaml", "src/commitlint.config.js"] - include: ["src/.releaserc.yaml", "src/commitlint.config.js"]
- rename: - rename:
@@ -103,11 +98,7 @@ Use common-repo's YAML merge operator to patch specific fields:
```yaml ```yaml
- repo: - repo:
url: https://github.com/christmas-island/cr-semantic-release url: https://github.com/christmas-island/cr-semantic-release
ref: v1.0.0 ref: v1.1.0
with:
- include: ["src/**", "src/.*", "src/.*/**"]
- rename:
- "^src/(.*)$": "$1"
- yaml: - yaml:
source: my-releaserc-overrides.yaml source: my-releaserc-overrides.yaml
dest: .releaserc.yaml dest: .releaserc.yaml