diff --git a/.gitignore b/.gitignore index 384cc3e88dd..83f5ed09b03 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /dist **/*.swp /.idea +/releasenotes/config.yaml \ No newline at end of file diff --git a/Makefile b/Makefile index c4f9657716e..27abc320232 100644 --- a/Makefile +++ b/Makefile @@ -288,4 +288,4 @@ reno-new: @$(MAKE) run CMD="reno new $(note)" reno-report: - @$(MAKE) run CMD="reno report > ./CHANGELOG.md" \ No newline at end of file + @$(MAKE) run CMD="./build/reno_report.sh $(VERSION)" \ No newline at end of file diff --git a/build/reno_report.sh b/build/reno_report.sh new file mode 100755 index 00000000000..0cc8d924336 --- /dev/null +++ b/build/reno_report.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +version=${1:-"''"} + +## Latest notes should go to current version +## We generate report before tagging the repo, so we need to set this version here +# echo "unreleased_version_title: ${version}" > reno.yaml +sed "s/unreleased_version_title: ''/unreleased_version_title: ${version}/g" reno.yaml > releasenotes/config.yaml + +## Generate rst report +reno report --output ./CHANGELOG.rst + +## Convert rst to markdown +rst2md ./CHANGELOG.rst --output ./CHANGELOG.md \ No newline at end of file diff --git a/build/run_container.sh b/build/run_container.sh index d2618a68646..40900458f83 100755 --- a/build/run_container.sh +++ b/build/run_container.sh @@ -23,7 +23,7 @@ set -o nounset PWD="${PWD:-$(pwd)}" DOCS_BUILD_IMAGE="${DOCS_BUILD_IMAGE:-ghcr.io/kanisterio/docker-sphinx:0.2.0}" -BUILD_IMAGE="${BUILD_IMAGE:-ghcr.io/kanisterio/build:v0.0.28}" +BUILD_IMAGE="${BUILD_IMAGE:-ghcr.io/kanisterio/build:v0.0.28-reno}" PKG="${PKG:-github.com/kanisterio/kanister}" ARCH="${ARCH:-amd64}" diff --git a/releasenotes/README.md b/releasenotes/README.md index ca4ce0ef739..338b1a46fde 100644 --- a/releasenotes/README.md +++ b/releasenotes/README.md @@ -23,11 +23,11 @@ When reviewing a PR, a reviewer should check if there are change notes added if Changelog can be generated using: ``` -reno report ./ > CHANGELOG.md +make reno-report ``` -OR +or to mark specific current version: ``` -make reno-report +make reno-report VERSION=$CURRENT_VERSION ``` This will create a CHANGELOG.md file with changes from committed release notes. @@ -37,3 +37,4 @@ It can later be passed to goreleaser build as `CHANGELOG_FILE` variable: ``` make gorelease CHANGELOG_FILE=./CHANGELOG.md ``` + diff --git a/releasenotes/config.yaml b/reno.yaml similarity index 94% rename from releasenotes/config.yaml rename to reno.yaml index 31ea7fde3e2..f989cfba2ba 100644 --- a/releasenotes/config.yaml +++ b/reno.yaml @@ -14,6 +14,8 @@ sections: - [deprecations, Deprecations] - [other, Other Notes] +unreleased_version_title: '' + prelude_section_name: release_summary template: | ---