Repository navigation
Description
Same as elixir-cloud-aai/cloud-registry#220 (proTES has the same docs hooks and release tooling): take the release version from one source, so that a release doesn't need to find and bump the version in many places.
This must land before proTES's first release, as part of the release preparation (R6, the release notes PR), so that the release notes PR sets the version only in CITATION.cff and docs/releases/.
Decision (as for cloud-registry)
- One version source: the release tag; before tagging,
CITATION.cff(version, set byscripts/citation.py setand checked against the tag by the release workflow) carries it ondev. - Docs get it through a variable:
{{ version }}in pages, replaced by the existing docs hooks (docs/hooks.py, no new plugin such as mkdocs-macros), e.g.,elixircloud/protes:{{ version }}and links to/en/v{{ version }}/. - Chart README (
deployment/README.md):{{ version }}too, replaced byscripts/chart_readme.pywhen the chart is packaged, and by the docs hooks when it is included in the docs. - No release numbers in comments, templates and tests: use placeholders (e.g.,
1.2.3, "this release"), and refer to sections by their anchor, not by a heading that names a version. - Drift guard in CI: a test that fails if the current release version (from
CITATION.cff) appears in a tracked file outside an allowlist:CITATION.cff,docs/releases/, links to release notes (releases/<version>), and migration headings (e.g., "From versions before X").
Port the implementation of cloud-registry (docs hook, chart_readme.py, the drift guard test and the docs in docs/development.md) once it is merged there.
Acceptance criteria
-
{{ version }}is replaced in all docs pages and the included chart README; the strict docs build passes. -
scripts/chart_readme.pyreplaces{{ version }}in the packaged README, with tests. - The docs, chart README, comments, templates and tests don't hard-code the release version (except the allowlist).
- A test fails if the current release version appears outside the allowlist (a no-op while
CITATION.cffhas noversion).
Update: implemented in elixir-cloud-aai/cloud-registry#224 (merged); port it from there. It also adds {{ chart_version }} (the SemVer form used in chart file names, e.g., 1.2.3-rc1), and the guard only flags mentions of the version as a release of the app (tag, image or chart, "release/version X", inline code, tag:/appVersion:), so that dependency or spec versions do not block a release.
Activity