You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: DOC-752 copies changelog on docs build and adds to sidebar menu (#1345)
Copies the changelog during sphinx build step into the docs for
publishing. Adds it to the sidebar. Downside of this approach is that
page 404s in local render, but this seems like the easiest way to
implement.
During this change I discovered our cog template wasn't actually being
used. The default template had some invalid JSX in the form of html
style="" spans around the word breaking. When I went to remove that I
discovered our template wasn't actually being used at all.
`cog bump --package` changelog uses the `package_template` which was
unset, so our template was never actually used. I made additional
changes to the template to correct whitespace in output, and add PR
links, and adjust the output heading.
Finally, I added a script that can regen the changelog, to back fix all
the old changelog entries.
{# Tera templates are used to generate the changelog content -#}
2
-
{# https://keats.github.io/tera/docs/ -#}
3
-
{# Based on Cocogittos remote template, but adds breaking changes: https://github.com/cocogitto/cocogitto/blob/main/src/conventional/changelog/template/remote -#}
4
-
{# First display all the breaking changes -#}
5
-
{% set breaking_commits = commits | filter(attribute="breaking_change", value=true) -%}
6
-
{% if breaking_commits | length > 0 -%}
7
-
#### ⚠ Breaking Changes
1
+
{%- if version.tag %}
2
+
## {{ version.tag }} - {{ date | date(format="%Y-%m-%d") }}
3
+
{% else %}
4
+
{%- set from = commits | last -%}
5
+
{%- set to = version.id -%}
6
+
{%- set from_shorthand = from.id | truncate(length=7, end="") -%}
7
+
{%- set to_shorthand = to | truncate(length=7, end="") %}
0 commit comments