Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ the API stability policy and migration guide before upgrading from `0.3.x`.

### Changed

- Add README health and support badges for CI, downstream consumers, PyPI, and supported Python versions.
- Normalize command returns, Click errors, aborts, interrupts, `SystemExit`, and
unexpected exceptions through one core outcome model and clean `run_app()`
process boundary.
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# `base-cli`

[![Tests](https://img.shields.io/github/actions/workflow/status/basefoundry/base-cli/tests.yml?branch=main&label=tests)](https://github.com/basefoundry/base-cli/actions/workflows/tests.yml)
[![Reference consumers](https://img.shields.io/github/actions/workflow/status/basefoundry/base-cli/compatibility.yml?branch=main&label=consumers)](https://github.com/basefoundry/base-cli/actions/workflows/compatibility.yml)
[![PyPI](https://img.shields.io/pypi/v/base-cli.svg)](https://pypi.org/project/base-cli/)
[![Python](https://img.shields.io/pypi/pyversions/base-cli.svg)](https://pypi.org/project/base-cli/)

| Version | License | Install | Release notes |
| --- | --- | --- | --- |
| `0.4.0` | [Apache-2.0](LICENSE) | `python -m pip install base-cli` | [v0.4.0](https://github.com/basefoundry/base-cli/releases/tag/v0.4.0) |
Expand Down
19 changes: 18 additions & 1 deletion tests/validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,24 @@ for file in "${required_files[@]}"; do
done

version="$(head -n 1 VERSION | tr -d '\r')"
if ! sed -n '1,12p' README.md | tr -d '\r' | grep -F "| \`$version\` | [Apache-2.0](LICENSE) | \`python -m pip install base-cli\` | [v$version](https://github.com/basefoundry/base-cli/releases/tag/v$version) |" >/dev/null; then
readme_head="$(sed -n '1,18p' README.md | tr -d '\r')"
if ! printf '%s\n' "$readme_head" | grep -F "[![Tests](https://img.shields.io/github/actions/workflow/status/basefoundry/base-cli/tests.yml?branch=main&label=tests)](https://github.com/basefoundry/base-cli/actions/workflows/tests.yml)" >/dev/null; then
printf 'README.md is missing the main-branch tests health badge.\n' >&2
exit 1
fi
if ! printf '%s\n' "$readme_head" | grep -F "[![Reference consumers](https://img.shields.io/github/actions/workflow/status/basefoundry/base-cli/compatibility.yml?branch=main&label=consumers)](https://github.com/basefoundry/base-cli/actions/workflows/compatibility.yml)" >/dev/null; then
printf 'README.md is missing the reference-consumer health badge.\n' >&2
exit 1
fi
if ! printf '%s\n' "$readme_head" | grep -F "[![PyPI](https://img.shields.io/pypi/v/base-cli.svg)](https://pypi.org/project/base-cli/)" >/dev/null; then
printf 'README.md is missing the PyPI release badge.\n' >&2
exit 1
fi
if ! printf '%s\n' "$readme_head" | grep -F "[![Python](https://img.shields.io/pypi/pyversions/base-cli.svg)](https://pypi.org/project/base-cli/)" >/dev/null; then
printf 'README.md is missing the supported Python versions badge.\n' >&2
exit 1
fi
if ! printf '%s\n' "$readme_head" | grep -F "| \`$version\` | [Apache-2.0](LICENSE) | \`python -m pip install base-cli\` | [v$version](https://github.com/basefoundry/base-cli/releases/tag/v$version) |" >/dev/null; then
printf 'README.md release strip does not match VERSION (%s), license, install command, and release link.\n' "$version" >&2
exit 1
fi
Expand Down