diff --git a/justfile b/justfile index c716dfe..42ee482 100644 --- a/justfile +++ b/justfile @@ -51,6 +51,14 @@ cut-version VERSION: fi mkdir -p versions cp -R src "versions/{{VERSION}}" + # Freeze the version marker in the snapshot. src/ keeps the literal + # `latest (main)` so the rolling /latest/ build stays accurate. + sed -i 's|`latest (main)`|`{{VERSION}}`|' "versions/{{VERSION}}/00-overview.md" + if ! grep -q '`{{VERSION}}`' "versions/{{VERSION}}/00-overview.md"; then + echo "warning: expected version marker not found in 00-overview.md; the" >&2 + echo "snapshot still says 'latest (main)'. Check that src/00-overview.md" >&2 + echo "contains the marker line ('**Spec version:** \`latest (main)\`')." >&2 + fi echo "Snapshotted src/ -> versions/{{VERSION}}" echo echo "Next steps:" diff --git a/scripts/build-site.sh b/scripts/build-site.sh index aadf8fe..2cbf3ff 100755 --- a/scripts/build-site.sh +++ b/scripts/build-site.sh @@ -30,6 +30,7 @@ mkdir -p "$SITE_DIR" # ---- latest (from src/) ---- group "build latest" +MDBOOK_BOOK__TITLE="MeshCore Protocol Specification — latest (main)" \ MDBOOK_OUTPUT__HTML__SITE_URL="${SITE_BASE}/latest/" \ mdbook build "$WORKSPACE" -d "$SITE_DIR/latest" endgroup @@ -51,6 +52,7 @@ for version in $VERSION_DIRS; do [ -d "$vdir" ] || continue group "build $version" if ! MDBOOK_BOOK__SRC="$vdir" \ + MDBOOK_BOOK__TITLE="MeshCore Protocol Specification — ${version}" \ MDBOOK_OUTPUT__HTML__SITE_URL="${SITE_BASE}/${version}/" \ mdbook build "$WORKSPACE" -d "$SITE_DIR/${version}"; then warn "mdbook build failed for ${version}; skipping" diff --git a/src/00-overview.md b/src/00-overview.md index 39294af..25543f0 100644 --- a/src/00-overview.md +++ b/src/00-overview.md @@ -2,6 +2,9 @@ ## Section 0: Overview +**Spec version:** `latest (main)` · see +[Spec Versions](#spec-versions) for the full list of frozen releases. + ### Status and Provenance > **This is an unofficial, independent specification.** It is **not** part of diff --git a/versions/v0.1.0/00-overview.md b/versions/v0.1.0/00-overview.md index 39294af..1a7a7c4 100644 --- a/versions/v0.1.0/00-overview.md +++ b/versions/v0.1.0/00-overview.md @@ -2,6 +2,9 @@ ## Section 0: Overview +**Spec version:** `v0.1.0` · see +[Spec Versions](#spec-versions) for the full list of frozen releases. + ### Status and Provenance > **This is an unofficial, independent specification.** It is **not** part of