diff --git a/changelogs/internal/newsfragments/2078.clarification b/changelogs/internal/newsfragments/2078.clarification new file mode 100644 index 00000000..d9285d5a --- /dev/null +++ b/changelogs/internal/newsfragments/2078.clarification @@ -0,0 +1 @@ +Add link to the git commit for the unstable changelog. diff --git a/layouts/docs/changelog.html b/layouts/docs/changelog.html index b23c8074..94fa55a3 100644 --- a/layouts/docs/changelog.html +++ b/layouts/docs/changelog.html @@ -31,9 +31,17 @@
Git commit | {{ $commitLink }} | + {{ if ne $version "unstable" }}
---|---|
Release date | {{ .Date | time.Format ":date_long" }} | {{ end -}} {{ $checklist := .OutputFormats.Get "checklist" -}} diff --git a/scripts/generate-changelog.sh b/scripts/generate-changelog.sh index 678af60f..9c80b059 100755 --- a/scripts/generate-changelog.sh +++ b/scripts/generate-changelog.sh @@ -44,8 +44,18 @@ outputs: - html - checklist date: $(date -Idate) ---- EOF + + # Add the commit hash for the unstable versions. It is used to generate a + # link to the commit on the repository. + if [ "$VERSION" == "vUNSTABLE" ]; then + echo "params:" + echo " commit: $(git rev-parse --short HEAD)" + fi + + # Close the frontmatter. + echo "---" + # Remove trailing whitespace (such as our intentionally blank RST headings) sed -e "s/[ ]*$//" rendered.md } > ../content/changelog/$FILENAME