8000 fix(release): keep the API schema's version in step with each release by adeelahmad · Pull Request #310 · adeelahmad/lense · GitHub
[go: up one dir, main page]

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
6 changes: 4 additions & 2 deletions .github/scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
release.py cut auto|patch|minor|major|X.Y.Z [--date YYYY-MM-DD]
Writes the new version's CHANGELOG.md section: the "## Unreleased" text, when there is any, then the changes
merged since the last release, listed from their Conventional Commit titles (except those that wrote their
own Unreleased entry, unless breaking). Sets the version in pyproject.toml, uv.lock, package.json and
CloudronManifest.json (when present) and prints it. `auto` picks the bump from those titles and any
own Unreleased entry, unless breaking). Sets the version in pyproject.toml, uv.lock, package.json, the API
schema (openapi.json) and CloudronManifest.json (when present) and prints it. `auto` picks the bump from those titles and any
BREAKING CHANGE footers: a breaking change is major (minor before 1.0), a feat minor, anything else patch.
release.py notes X.Y.Z
Prints that version's CHANGELOG.md section without its heading (nothing when there's none).
Expand Down Expand Up @@ -37,6 +37,8 @@
"CloudronManifest.json": r'(^ "version": ")([^"]+)(")',
# what a running Lens says it is (the API, MCP, telemetry, and the update check in docs/updates.md)
"fastapi_backend/app/domain/__init__.py": r'(^__version__ = ")([^"]+)(")',
# the API schema's info.version is __version__, and CI checks the committed schema matches the generated one
"nextjs-frontend/openapi.json": r'(^ "version": ")([^"]+)(")',
}

TYPES = {
Expand Down
3 changes: 2 additions & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ With `auto` it picks the version from the PR titles merged since the last releas
override. It writes the new section (the Unreleased text, then the changes grouped into features, fixes,
performance, reverts, dependencies and other changes; `docs`, `refactor`, `test`, `build`, `ci`, `chore` and
`style` are left out, and so is a PR that wrote its own Unreleased entry, unless it's breaking), sets the version in `fastapi_backend/pyproject.toml`, `uv.lock`,
`nextjs-frontend/package.json` and `CloudronManifest.json`, commits that to `main` as `chore(release): vX.Y.Z`, tags
`nextjs-frontend/package.json`, the API schema `nextjs-frontend/openapi.json`, `app/domain/__init__.py` and
`CloudronManifest.json`, commits that to `main` as `chore(release): vX.Y.Z`, tags
it and publishes the GitHub release with that section as its notes. Pushing a `vX.Y.Z` tag yourself publishes it the
same way, without the commit. `python3 .github/scripts/release.py cut auto` shows locally what it would write.
An exact version must be newer than the current one, and only the newest version is marked Latest. If a run pushed its
Expand Down
2 changes: 1 addition & 1 deletion nextjs-frontend/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openapi": "3.1.0",
"info": {
"title": "Lens",
"version": "0.6.0"
"version": "0.7.0"
},
"paths": {
"/api/v1/auth/status": {
Expand Down
Loading
0